Skip to content

Commit 7a485b4

Browse files
committed
164 chars
1 parent 2f3ac07 commit 7a485b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

09.min.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
main=interact$(++"\n").show.((,)<$>a<*>a.map reverse).map(map read.words).lines
2-
w z=if all(==0)z then[z]else z:w(zipWith(-)(drop 1$z)z)
3-
a=sum.map(foldr(\u d->last u+d)0.w)
2+
a=sum.map(sum.map last.w);w=takeWhile(any(/=0)).iterate d
3+
d z=zipWith(-)(drop 1$z)z

0 commit comments

Comments
 (0)