blob: 5e26219e0bae51ce981aca37205acc8c1c850acf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#lang scheme
;; invert
;;
;; takes a list of 2-lists and returns a list with each
;; 2-list reversed
(define
(invert list)
list
)
;; vector-index
;;
;; returns the zero-based index of the first occurrence of
;; a parameter in a vector, or -1 if there is no occurrence
(define
(vector-index needle haystack)
haystack
)
;; count-occurrences
;;
;; returns the number of occurrences of a parameter in a list
(define
(count-occurrences needle haystack)
haystack
)
;; compose23
;;
;;
(define
(compose23 a b c)
(a (b c))
)
|