Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USING: io kernel math math.parser strings sequences locals ;
- IN: template
- :: test ( rtn cur -- a b )
- cur "" =
- [ rtn cur ]
- [
- cur 1 tail
- cur 1 head
- dup "1" = [ drop "" ] [ ] if
- dup "2" = [ drop "" ] [ ] if
- dup "3" = [ drop "" ] [ ] if
- dup "4" = [ drop "" ] [ ] if
- dup "5" = [ drop "" ] [ ] if
- dup "6" = [ drop "" ] [ ] if
- dup "7" = [ drop "" ] [ ] if
- dup "8" = [ drop "" ] [ ] if
- dup "9" = [ drop "" ] [ ] if
- dup "0" = [ drop "" ] [ ] if
- rtn
- swap
- append
- swap
- test
- ]
- if ;
- ""
- readln
- test
- drop
- print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement