Created
July 8, 2013 15:03
-
-
Save egisatoshi/5949612 to your computer and use it in GitHub Desktop.
Playing with prime numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/egi/egison3% egison [130] | |
Egison Version 3.0.8 (C) 2011-2013 Satoshi Egi | |
http://egison.pira.jp | |
Welcome to Egison Interpreter! | |
> (take 5 (match-all primes (list integer) [<join _ <cons $n <cons ,(+ n 2) <cons ,(+ n 6) _>>>> [n (+ n 2) (+ n 6)]])) | |
{[5 7 11] [11 13 17] [17 19 23] [41 43 47] [101 103 107]} | |
> (take 5 (match-all primes (list integer) [<join _ <cons $n <cons ,(+ n 4) <cons ,(+ n 6) _>>>> [n (+ n 2) (+ n 6)]])) | |
{[7 9 13] [13 15 19] [37 39 43] [67 69 73] [97 99 103]} | |
> | |
Leaving Egison Interpreter. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment