Skip to content

Instantly share code, notes, and snippets.

@baudtack
Created September 19, 2018 23:00
Show Gist options
  • Save baudtack/c82dede8e947b2845afd3a299cd28eec to your computer and use it in GitHub Desktop.
Save baudtack/c82dede8e947b2845afd3a299cd28eec to your computer and use it in GitHub Desktop.
!:
:- %say
|= [* [n=@ud ~] ~]
:- %noun
=| lis=(list @ud)
|-
^- (list @ud)
?: (lte n 0)
lis
%= $
n (div n 10)
lis (mod n 10)^lis
==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment