Skip to content

Instantly share code, notes, and snippets.

@egisatoshi
Last active August 29, 2015 13:55
Show Gist options
  • Save egisatoshi/8780115 to your computer and use it in GitHub Desktop.
Save egisatoshi/8780115 to your computer and use it in GitHub Desktop.
Easy access to IO from the prompt. This is a feature from Egison version 3.2.12
% egison
Egison Version 3.2.12 (C) 2011-2014 Satoshi Egi
http://www.egison.org
Welcome to Egison Interpreter!
> (io (each print (take 10 (map itos primes))))
2
3
5
7
11
13
17
19
23
29
[]
> (io (rand 1 6))
5
> (io (rand 1 6))
6
> (io (rand 1 6))
2
> (io (rand 1 6))
1
> (io (rand 1 6))
5
> ^D
Leaving Egison Interpreter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment