Skip to content

do構文を追加 #359

@hidekuno

Description

@hidekuno

do

gosh> (do ((i 0 (+ i 1))
     (j 0 (+ i j)))
    ((= i 10) j)
  (print j))
(do ((i 0 (+ i 1))
     (j 0 (+ i j)))
    ((= i 10) j)
  (print j))
0
0
1
3
6
10
15
21
28
36
45
gosh> (do ((a '(0 1 2 3 4) (cdr a)))
    ((null? a) "ok")
  (print "hello")
  (print (car a)))
hello
0
hello
1
hello
2
hello
3
hello
4
"ok"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions