on 492ae2f help sign in
44 lines 717 B history raw
1### `++homo`
3Homogenize
5Produces a `++list` whose type is a fork of all the contained types in the
6list `a`. Used when you want to make all the types of the elements of a list the same.
8Accepts
9-------
11`a` is a list.
13Produces
14--------
16a list.
18Source
19------
21 ++ homo :: homogenize
22 |* a/(list)
23 ^+ =< $
24 |% +- $ ?:(*? ~ [i=(snag 0 a) t=$])
25 --
26 a
29Examples
30--------
32 ~zod/try=> lyst
33 [i=1 t=[i=97 t=[i=2 t=[i=98 t=[i=[~ u=10] t=~]]]]]
34 ~zod/try=> (homo lyst)
35 ~[1 97 2 98 [~ u=10]]
36 ~zod/try=> =a (limo [1 2 3 ~])
37 ~zod/try=> a
38 [i=1 t=[i=2 t=[i=3 t=~]]]
39 ~zod/try=> (homo a)
40 ~[1 2 3]
44***