Skip to content

Commit 2f3489e

Browse files
recursive S-Expression construction/inspection working
1 parent ca8c694 commit 2f3489e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lambda_mountain"
3-
version = "1.11.72"
3+
version = "1.11.73"
44
authors = ["Andrew <andrew@subarctic.org>"]
55
license = "MIT"
66
description = "Lambda Mountain"

STDLIB/default-stdlib.lm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ print := λ(: x S). (: (tail(
2020
(if (==( (.0 x) 1u64 )) (tail(
2121
(let c SNil)
2222
(print '\[_s)
23-
(print( (as (.1 (as x SCons)) U64) ))
24-
(mov( (.1 (as x SCons)) 0u64 c ))
23+
(mov( (.2 (as x SCons)) 0u64 c ))
2524
(print c)
2625
(print '\s_s)
27-
(print( (as (.2 (as x SCons)) U64) ))
28-
(mov( (.2 (as x SCons)) 0u64 c ))
26+
(mov( (.1 (as x SCons)) 0u64 c ))
2927
(print c)
3028
(print '\]_s)
3129
()

tests/strict/cc2.lm

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ echo := λ(: x U64). (: (
99
) U64);
1010

1111
main := (tail(
12-
# (let x (SCons(
13-
# (close(SAtom( 'an-atom_s )))
14-
(close(SNil))
12+
(let l1 (SAtom( 'an-atom_s )))
13+
(let l2 (close l1))
14+
(let r1 (SNil))
15+
(let r2 (close r1))
16+
(let x (SCons( l2 r2 )))
17+
(print x)
1518
()
19+
# (print (SCons(
20+
# (SAtom( 'an-atom_s ))
21+
# (SNil)
1622
# )))
17-
# (print x)
1823
));

0 commit comments

Comments
 (0)