;;; ;;; Test of Pop-11 in Poplog's clisp. ;;; ;;; Run as ;;; clisp pop11_in_lisp_test.lsp ;;; ;;; Inspired by ;;; * http://zephyrfalcon.org/weblog2/arch_e10_00560.html#e562 ;;; * HELP POPLISP ;;; ;;; This Pop-11 program was created by Hakan Kjellerstrand (hakank@bonetmail.com ;;; See also my Pop-11/Poplog page: http://www.hakank.org/poplog/ ;;; == (pop11) 'Pop11_in_list_test.lsp'=> define fun(x, y) -> result; 2 * x + 2*y -> result; enddefine; define big(n); 2**n-1; enddefine; define my_member(item, list); list matches [== ^item ==]; enddefine; clisp; == (print '(pop11:fun 3 4)) == (print (pop11:fun 3 4)) == (print '(pop11:big 1234)) == (print (pop11:big 1234)) == (print '(- (expt 2 123) 1)) == (print (- (expt 2 123) 1)) == (print '(pop11::unpackitem (- (expt 2 123) 1))) == (print (pop11::unpackitem (- (expt 2 123) 1))) == (print '(pop11::unpackitem (pop11:big 123))) == (print (pop11::unpackitem (pop11:big 123))) == (print '(pop11::my_member 3 '(1 2 3 4 5))) == (print (pop11::my_member 3 '(1 2 3 4 5))) == (print '(pop11::my_member 13 '(1 2 3 4 5))) == (print (pop11::my_member 13 '(1 2 3 4 5)))