Skip to content

Commit d4271e0

Browse files
committed
−4 characters
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
1 parent d5f67f4 commit d4271e0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

TinyLambda-minimized.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ data T=T{a::T->T,(%)::ShowS}
22
i d=T(i. \x v->'(':d v++' ':x%v++")")d
33
l f v=""++v++". "++f(i(\_->v))%('x':v)++")"
44
(?)=q.head.lex
5-
q("(",'λ':s)k|[(w,_:t)]<-lex s=t? \b->k(\e->T<*>l$b.(:e).(,)w).tail
6-
q("(",s)k=s? \f->(? \x->k(a.f<*>x).tail)
7-
q(v,s)k=k(foldl1 a.lookup v)s
5+
q(v,s)k|v/="("=k(foldl1 a.lookup v)s|'λ':u<-s,[(w,_:t)]<-lex u=t? \b->k(\e->T<*>l$b.(:e).(,)w).tail|0<1=s? \f->(? \x->k(a.f<*>x).tail)
86
main=interact(? \f->(f[]%"x"++))

0 commit comments

Comments
 (0)