UNB/ CS/ David Bremner/ teaching/ htdp+emacs

Summary

images as output test results signature report
bsl 1 2
bsl+ 3 4
isl
isl+ 5
asl

Tests are with racket-mode 20230628git0-1, Emacs 29.1 and racket 8.10 on Debian.

Signature report test

#lang htdp/isl+

(: Foldr ((%a %a -> %a) String (ListOf %a) -> %a))
(define (Foldr combine base lst)
  (cond
    [(empty? lst) base]
    [else (combine
            (first lst)
            (Foldr combine base (rest lst)))]))

(define (sum-list lst) (Foldr + 0 lst))

(sum-list '(1 2 3))