on 492ae2f help sign in
40 lines 571 B history raw
1### `++slag`
3Suffix
5Accepts an atom `a` and list `b`, producing the remaining elements from
6`b` starting at `a`.
8Accepts
9-------
11`b` is a list.
13Produces
14--------
16A list of the same type as `b`.
18Source
19------
21 ++ slag :: suffix
22 ~/ %slag
23 |* {a/@ b/(list)}
24 |- ^+ b
25 ?: =(0 a) b
26 ?~ b ~
27 $(b t.b, a (dec a))
30Examples
31--------
33 ~zod/try=> (slag 2 (limo [1 2 3 4 ~]))
34 [i=3 t=[i=4 t=~]]
35 ~zod/try=> (slag 1 (limo [1 2 3 4 ~]))
36 [i=2 t=[i=3 t=[i=4 t=~]]]
40***