@@ -1,5 +1,8 @@ -; ʞ / struct.scm +; [ʞ] struct.scm +; ~ lexi hale +; © affero general public license +; > (load "lib/struct.scm") ; ; generates immutable, relatively efficient structs. declare ; a struct type x with ; (define x (struct 'field1 'field2) @@ -9,11 +12,11 @@ ; (y 'field1) ; update field2 of record y with ; (y 'field2 123) → new record (field1 = 123; field2 = 123) ; -; this unit also includes a few utility function that chicken -; scheme conveniently "forgot." i apologize for the implementation -; of (list-head). i was very tired. +; this unit also includes a few utility function that +; chicken scheme conveniently "forgot." i apologize for +; the implementation of (list-head). i was very tired. ; return a sub-list of lst up to ct (inverse of list-tail) (define (list-head lst ct) (let* ([reverse-lst (reverse lst)]