wip
This commit is contained in:
parent
fbdc710918
commit
7bbf3a5070
5 changed files with 57 additions and 1 deletions
20
fop-klausur.rkt
Normal file
20
fop-klausur.rkt
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
;; The first three lines of this file were inserted by DrRacket. They record metadata
|
||||
;; about the language level of this file in a form that our tools can easily process.
|
||||
#reader(lib "htdp-advanced-reader.ss" "lang")((modname fop-klausur) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f)))
|
||||
(define-struct abc (a b))
|
||||
|
||||
(define (foo p)
|
||||
(if (abc? p)
|
||||
(if (list? (abc-b p))
|
||||
(cons (abc-a p) (abc-b p))
|
||||
empty)
|
||||
empty))
|
||||
|
||||
(define (bar lst n)
|
||||
(cond
|
||||
[(= 0 n) empty]
|
||||
[(< (length lst) n) lst]
|
||||
[else (cons (first lst) (bar (rest lst) (- n 1)))]))
|
||||
|
||||
(define (foo-bar n)
|
||||
(lambda (x) (bar x n)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue