#:g1: QiでL-99 (P22 指定した範囲の数列のリスト)

Posted 2008-04-06 09:18:00 GMT

-(http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html)

(range 0.5 10)
\=> [0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 9.5]
\

(define range Start End -> [ ] where (> Start End) Start End -> [Start | (range (+ 1 Start) End)])


comments powered by Disqus