Skip to content

Instantly share code, notes, and snippets.

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