Добре дошли в DrRacket, версия 7.0 [3m]. Език: R5RS; memory limit: 128 MB. > (1 . (2 . (3 . ()))) [image] [image] application: not a procedure; expected a procedure that can be applied to arguments given: 1 arguments > (length l) 6 > (length l) 5 > (list-tail l 2) (3 4 5) > (list-tail l 10) [image] [image] mcdr: contract violation expected: mpair? given: () > (list-ref l 0) 1 > (list-ref l 2) 3 > (member (list 1 2) (list (list 1 2) (list 3 4) (list 5 6))) ((1 2) (3 4) (5 6)) > () [image] #%app: missing procedure expression; probably originally (), which is an illegal empty application in: (#%app) > (from-to 1 10) (1 2 3 4 5 6 7 8 9 10) > (collect 1 10 exp) (2.718281828459045 7.38905609893065 20.085536923187668 54.598150033144236 148.4131591025766 403.4287934927351 1096.6331584284585 2980.9579870417283 8103.083927575384 22026.465794806718) > (append l l) (1 2 3 4 5 1 2 3 4 5) > (eqv? (list-ref (append l l) 3) l) #f > (eqv? (list-tail (append l l) 3) l) #f > (eqv? (list-tail (append l l) (length l)) l) #t > (reverse l) (2 3 4 5 . 1) > (reverse l) > (reverse l) (2 3 4 5 1) > (eqv? (list-tail (append l l) (length l)) l) > (append l l) (1 2 3 4 5 1 2 3 4 5) > (reverse l) (5 4 3 2 1) > (map exp (from-to 1 10)) (2.718281828459045 7.38905609893065 20.085536923187668 54.598150033144236 148.4131591025766 403.4287934927351 1096.6331584284585 2980.9579870417283 8103.083927575384 22026.465794806718) > (filter odd? (from-to 1 10)) (1 3 5 7 9) > (filter negative? (from-to 1 10)) () > (foldr + 0 l) 15 > (accumulate + 0 1 5 (lambda (x) (* x x)) (lambda (x) (+ x 1))) 55 > (map exp l) (2.718281828459045 7.38905609893065 20.085536923187668 54.598150033144236 148.4131591025766) > (filter odd? l) (1 3 5) > (length 10) [image] [image] mcar: contract violation expected: mpair? given: 10 > (length l) 5 > (append l l) (1 2 3 4 5 1 2 3 4 5) > (reverse l) (5 4 3 2 1) > (foldl + 0 l) 15 > (foldr + 0 l) 15 > (reverse l) (5 4 3 2 1) > (foldl rcons '() l) [image] [image] mcar: contract violation expected: mpair? given: 1 > (reverse l) (5 4 3 2 1) > (count-atoms dl) 8 >