on 492ae2f help sign in
36 lines 534 B history raw
1### `++swag`
3Infix
5Similar to `substr` in Javascript: extracts a string infix, beginning at
6inclusive index `a`, producing `b` number of characters.
8Accepts
9-------
11`c` is a list.
13Produces
14--------
16A list of the same type as `c`.
18Source
19------
21 ++ swag :: infix
22 |* {{a/@ b/@} c/(list)}
23 (scag +<-> (slag +<-< c))
26Examples
27--------
29 ~zod/try=> (swag [2 5] "roly poly")
30 "ly po"
31 ~zod/try=> (swag [2 2] (limo [1 2 3 4 ~]))
32 [i=3 t=[i=4 t=~]]
36***