aboutsummaryrefslogtreecommitdiff
path: root/challenge-261/deadmarshal/scheme/ch2.scm
blob: c864be8009ff160328d3dfcaecc7c2fab9692980 (plain)
1
2
3
4
5
6
7
8
9
10
(define (multiply-by-two list start)
  (if (member start list)
      (multiply-by-two list (* start 2))
      start))

(begin
  (display (multiply-by-two '(5 3 6 1 12) 3)) (newline)
  (display (multiply-by-two '(1 2 4 3) 1)) (newline)
  (display (multiply-by-two '(5 6 7) 2)) (newline))