make, swift3: fix parsing empty literal sequences.
[jackhill/mal.git] / ps / interop.ps
CommitLineData
2ab1e584 1% [ ps_val1...] -> ps2mal -> [ mal_val1...]
01c97316 2/ps2mal {
2ab1e584 3 % convert returned values to Mal types
01c97316
JM
4 [ exch
5 { %forall returned values
6 dup ==
7 dup type /arraytype eq {
8 (here1\n) print
9 _list_from_array
10 }{ dup type /dicttype eq {
11 (here2\n) print
12 _hash_map_from_dict
13 }{
14 (here3\n) print
15 % no-op
16 } ifelse } ifelse
17 } forall
18 ]
19 (here4\n) print
20} def
21