feat: compiled solution
This commit is contained in:
4
Makefile
4
Makefile
@@ -12,8 +12,8 @@ run: it
|
||||
profile: it
|
||||
@ ./lambda.exe -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
|
||||
|
||||
prof:
|
||||
@ go tool pprof -top profile/cpu.prof
|
||||
explain: it
|
||||
@ ./lambda.exe -x -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
|
||||
|
||||
graph:
|
||||
@ go tool pprof -raw -output=profile/cpu.raw profile/cpu.prof
|
||||
|
||||
11
samples/fast.txt
Normal file
11
samples/fast.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
fix f := (\x.(f (x x)) \x.(f (x x)))
|
||||
|
||||
inc := (fix \self.\l.(((l \x.\y.x) ((((l \x.\y.y) \x.\y.x) \c.((c \x.\y.x) \c.((c \x.\y.y) (self ((l \x.\y.y) \x.\y.y))))) \c.((c \x.\y.x) \c.((c \x.\y.x) ((l \x.\y.y) \x.\y.y))))) \c.((c \x.\y.x) \c.((c \x.\y.x) \VAR0.\x.\y.y))))
|
||||
one := \c.((c \x.\y.x) \c.((c \x.\y.x) \VAR0.\x.\y.y))
|
||||
double := \N.\c.((c \x.\y.x) \c.((c \x.\y.y) N))
|
||||
print := (fix \self.\l.(((l \x.\y.x) (((((l \x.\y.y) \x.\y.x) 1) 0) (self ((l \x.\y.y) \x.\y.y)))) END))
|
||||
|
||||
|
||||
N := \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.y) \c.((c \x.\y.x) \c.((c \x.\y.x) \VAR0.\x.\y.y))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
|
||||
|
||||
(print N)
|
||||
Reference in New Issue
Block a user