on 492ae2f help sign in
48 lines 649 B history raw
1### `++lsh`
3Left-shift
5Produces an atom by left-shifting `c` by `b` blocks of size `a`.
7Accepts
8-------
10`a` is a block size (see `++bloq`).
12`b` is an atom.
14`c` is an atom.
16Produces
17--------
19An atom.
21Source
22------
24 ++ lsh :: left-shift
25 ~/ %lsh
26 |= {a/bloq b/@u c/@}
27 (mul (bex (mul (bex a) b)) c)
30Examples
31--------
33 ~zod/try=> `@ub`1
34 0b1
35 ~zod/try=> `@ub`(lsh 0 1 1)
36 0b10
37 ~zod/try=> (lsh 0 1 1)
38 2
39 ~zod/try=> `@ub`255
40 0b1111.1111
41 ~zod/try=> `@ub`(lsh 3 1 255)
42 0b1111.1111.0000.0000
43 ~zod/try=> (lsh 3 1 255)
44 65.280
48***