;;;;; ;;;;; Collection.egi ;;;;; ;;; ;;; IO ;;; (define $print (lambda [$x] (do {[(write-string x)] [(write-string "\n")] } []))) (define $print-to-port (lambda [$port $x] (do {[(write-string-to-port port x)] [(write-string-to-port port "\n")] } []))) ;;; ;;; Collection ;;; (define $each (lambda [$proc $xs] (match xs (list something) {[ (do {} [])] [ (do {[(proc x)] [(each proc rs)] } [])]}))) ;;; ;;; Others ;;; (define $pure-rand (lambda [$s $e] (io (rand s e))))