on 492ae2f help sign in
39 lines 458 B history raw
1### `++bex`
3Binary exponent
5Computes the result of `2^a`, producing an atom.
7Accepts
8-------
10`a` is an atom.
12Produces
13--------
15An atom.
17Source
18------
20 ++ bex :: binary exponent
21 ~/ %bex
22 |= a/@
23 ^- @
24 ?: =(0 a) 1
25 (mul 2 $(a (dec a)))
27Examples
28--------
30 ~zod/try=> (bex 4)
31 16
32 ~zod/try=> (bex (add 19 1))
33 1.048.576
34 ~zod/try=> (bex 0)
35 1
39***