diff options
Diffstat (limited to 'codewars')
| -rw-r--r-- | codewars/6-kyu/pyramid-array/solution.rkt | 14 | ||||
| -rw-r--r-- | codewars/7-kyu/a-rule-of-divisibility-by-7/solution.rkt | 15 |
2 files changed, 0 insertions, 29 deletions
diff --git a/codewars/6-kyu/pyramid-array/solution.rkt b/codewars/6-kyu/pyramid-array/solution.rkt deleted file mode 100644 index 0d6a00b..0000000 --- a/codewars/6-kyu/pyramid-array/solution.rkt +++ /dev/null @@ -1,14 +0,0 @@ -#lang racket - -;; https://www.codewars.com/kata/515f51d438015969f7000013 - -(provide pyramid) - -(define (pyramid n) - (define (loop ret level cur) - (define next (cons 1 cur)) - (if (= level n) - (reverse ret) - (loop (cons next ret) (+ level 1) next))) - (loop '() 0 '())) - diff --git a/codewars/7-kyu/a-rule-of-divisibility-by-7/solution.rkt b/codewars/7-kyu/a-rule-of-divisibility-by-7/solution.rkt deleted file mode 100644 index 6859107..0000000 --- a/codewars/7-kyu/a-rule-of-divisibility-by-7/solution.rkt +++ /dev/null @@ -1,15 +0,0 @@ -#lang racket - -;; https://www.codewars.com/kata/55e6f5e58f7817808e00002e - -(provide seven) - -(define (seven m) - (define (impl cur steps) - (define x (quotient cur 10)) - (define y (modulo cur 10)) - (define next (- x (* 2 y))) - (if (< cur 100) - (cons cur steps) - (impl next (+ 1 steps)))) - (impl m 0)) |
