zip
8.18
top
← prev up next →

list-utilπŸ”— i

Raymond Racine <ray.racine@gmail.com>

1List UtilitiesπŸ”— i

procedure

( make-list lenelem)(ListofA)

len:Integer
elem:A
(All(a)Integera->(Listofa))

Create a list of length len by repeating the provided elem as necessary.

procedure

( weave elemlst)(ListofA)

elem:A
lst:(ListofA)
(All(a)a(Listofa)->(Listofa))

Weave an element strictly between two elements of the lst.

procedure

( zip asbs)(Listof(PairAB))

as:(ListofA)
bs:(ListofB)
(All(AB)(ListofA)(ListofB)->(Listof(PairAB)))

Return a list formed by pairing element by element from the two provided lists. The length of the returned list will be the same length of the shortest of the provided lists.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /