Pudu programming language
Menu
API reference

Std.Tree.zipWith

1 declaration

fn

zipWith: &Std.Tree.Tree[A] -> &Std.Tree.Tree[B] -> fn(A, B) -> C -> Std.Tree.Tree[C]

This is a callable function.

What it does

Two trees combined node by node, as far as both go.

Where one has more children than the other at some node, the extra ones are

dropped: there is nothing to combine them with, and inventing a value would

be answering a question that was not asked.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.

Back to Std.TreeSearch related declarations