| 1 |
;;; Ikarus Scheme -- A compiler for R6RS Scheme. |
| 2 |
;;; Copyright (C) 2006,2007,2008 Abdulaziz Ghuloum |
| 3 |
;;; |
| 4 |
;;; This program is free software: you can redistribute it and/or modify |
| 5 |
;;; it under the terms of the GNU General Public License version 3 as |
| 6 |
;;; published by the Free Software Foundation. |
| 7 |
;;; |
| 8 |
;;; This program is distributed in the hope that it will be useful, but |
| 9 |
;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
;;; General Public License for more details. |
| 12 |
;;; |
| 13 |
;;; You should have received a copy of the GNU General Public License |
| 14 |
;;; along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
|
| 16 |
|
| 17 |
(library (ikarus records procedural) |
| 18 |
(export |
| 19 |
make-record-type-descriptor record-type-descriptor? |
| 20 |
make-record-constructor-descriptor record-accessor |
| 21 |
record-mutator record-constructor record-predicate record? |
| 22 |
record-rtd record-type-name record-type-parent record-type-uid |
| 23 |
record-type-generative? record-type-sealed? record-type-opaque? |
| 24 |
record-type-field-names record-field-mutable? rtd-subtype? rtd?) |
| 25 |
(import |
| 26 |
(except (ikarus) |
| 27 |
record-constructor record-predicate record? record-type-name |
| 28 |
record-type-parent record-type-descriptor? record-rtd |
| 29 |
record-type-uid record-type-sealed? record-type-opaque? |
| 30 |
record-type-generative? make-record-type-descriptor |
| 31 |
make-record-constructor-descriptor record-accessor |
| 32 |
record-mutator |
| 33 |
record-type-field-names record-field-mutable? |
| 34 |
rtd? rtd-subtype?) |
| 35 |
(ikarus system $structs)) |
| 36 |
|
| 37 |
(define-struct rtd |
| 38 |
(name size old-fields printer-proc symbol parent sealed? opaque? uid fields)) |
| 39 |
|
| 40 |
(define rtd-alist '()) |
| 41 |
(define (intern-rtd! uid rtd) |
| 42 |
(set! rtd-alist (cons (cons uid rtd) rtd-alist))) |
| 43 |
(define (lookup-rtd uid) |
| 44 |
(cond |
| 45 |
[(assq uid rtd-alist) => cdr] |
| 46 |
[else #f])) |
| 47 |
|
| 48 |
(define (record-type-descriptor? x) (rtd? x)) |
| 49 |
|
| 50 |
(define (record? x) |
| 51 |
(and ($struct? x) |
| 52 |
(let ([rtd ($struct-rtd x)]) |
| 53 |
(and (rtd? rtd) |
| 54 |
(not (rtd-opaque? rtd)))))) |
| 55 |
|
| 56 |
(define (record-rtd x) |
| 57 |
(if ($struct? x) |
| 58 |
(let ([rtd ($struct-rtd x)]) |
| 59 |
(if (rtd? rtd) |
| 60 |
(if (not (rtd-opaque? rtd)) |
| 61 |
rtd |
| 62 |
(die 'record-rtd "record is opaque")) |
| 63 |
(die 'record-rtd "not a record" x))) |
| 64 |
(die 'record-rtd "not a record" x))) |
| 65 |
|
| 66 |
(define (record-type-name x) |
| 67 |
(if (rtd? x) |
| 68 |
(rtd-name x) |
| 69 |
(die 'record-type-name "not an rtd" x))) |
| 70 |
|
| 71 |
(define (record-type-parent x) |
| 72 |
(if (rtd? x) |
| 73 |
(rtd-parent x) |
| 74 |
(die 'record-type-parent "not an rtd" x))) |
| 75 |
|
| 76 |
(define (record-type-uid x) |
| 77 |
(if (rtd? x) |
| 78 |
(or (rtd-uid x) |
| 79 |
(let ([g (gensym)]) |
| 80 |
(set-rtd-uid! x g) |
| 81 |
(intern-rtd! g x) |
| 82 |
g)) |
| 83 |
(die 'record-type-uid "not an rtd" x))) |
| 84 |
|
| 85 |
(define (record-type-sealed? x) |
| 86 |
(if (rtd? x) |
| 87 |
(rtd-sealed? x) |
| 88 |
(die 'record-type-sealed? "not an rtd" x))) |
| 89 |
|
| 90 |
(define (record-type-opaque? x) |
| 91 |
(if (rtd? x) |
| 92 |
(rtd-opaque? x) |
| 93 |
(die 'record-type-opaque? "not an rtd" x))) |
| 94 |
|
| 95 |
(define (record-type-generative? x) |
| 96 |
(if (rtd? x) |
| 97 |
(not (rtd-sealed? x)) ;;; FIXME: bogus? |
| 98 |
(die 'record-type-generative? "not an rtd" x))) |
| 99 |
|
| 100 |
(define (record-type-field-names x) |
| 101 |
(if (rtd? x) |
| 102 |
(let ([v (rtd-fields x)]) |
| 103 |
(let ([n (vector-length v)]) |
| 104 |
(let f ([x (make-vector n)] [v v] [n n] [i 0]) |
| 105 |
(if (= i n) |
| 106 |
x |
| 107 |
(begin |
| 108 |
(vector-set! x i (cdr (vector-ref v i))) |
| 109 |
(f x v n (fxadd1 i))))))) |
| 110 |
(die 'record-type-field-names "not an rtd" x))) |
| 111 |
|
| 112 |
|
| 113 |
(module (make-record-type-descriptor) |
| 114 |
(define who 'make-record-type-descriptor) |
| 115 |
(define (make-rtd-aux name parent uid sealed? opaque? |
| 116 |
parent-size fields) |
| 117 |
(make-rtd name (+ parent-size (vector-length fields)) |
| 118 |
#f #f #f parent sealed? opaque? uid fields)) |
| 119 |
(define (convert-fields sv) |
| 120 |
(unless (vector? sv) |
| 121 |
(die who "invalid fields argument" sv)) |
| 122 |
(let ([n2 (vector-length sv)]) |
| 123 |
(let ([v (make-vector n2)]) |
| 124 |
(let f ([i 0]) |
| 125 |
(unless (= i n2) |
| 126 |
(let ([x (vector-ref sv i)]) |
| 127 |
(if (pair? x) |
| 128 |
(let ([m/u (car x)] [x (cdr x)]) |
| 129 |
(if (pair? x) |
| 130 |
(let ([name (car x)]) |
| 131 |
(unless (and (null? (cdr x)) (symbol? name)) |
| 132 |
(die who "invalid fields argument" sv)) |
| 133 |
(vector-set! v i |
| 134 |
(cons (case m/u |
| 135 |
[(mutable) #t] |
| 136 |
[(immutable) #f] |
| 137 |
[else |
| 138 |
(die who "invalid fields argument" sv)]) |
| 139 |
name))) |
| 140 |
(die who "invalid fields argument" sv))) |
| 141 |
(die who "invalid fields argument" sv))) |
| 142 |
(f (add1 i)))) |
| 143 |
v))) |
| 144 |
(define generate-rtd |
| 145 |
(lambda (name parent uid sealed? opaque? fields) |
| 146 |
(cond |
| 147 |
[(rtd? parent) |
| 148 |
(when (rtd-sealed? parent) |
| 149 |
(die who "cannot extend sealed parent" parent)) |
| 150 |
(make-rtd-aux name parent uid sealed? |
| 151 |
(or opaque? (rtd-opaque? parent)) |
| 152 |
(rtd-size parent) |
| 153 |
(convert-fields fields))] |
| 154 |
[(eqv? parent #f) |
| 155 |
(make-rtd-aux name parent uid sealed? opaque? 0 |
| 156 |
(convert-fields fields))] |
| 157 |
[else (die who "not a valid parent" parent)]))) |
| 158 |
(define (same-fields-as-rtd? fields rtd) |
| 159 |
(let* ([fv (rtd-fields rtd)] |
| 160 |
[n (vector-length fv)]) |
| 161 |
(and (vector? fields) |
| 162 |
(= (vector-length fields) n) |
| 163 |
(let f ([i 0]) |
| 164 |
(or (= i n) |
| 165 |
(let ([a (vector-ref fields i)] |
| 166 |
[b (vector-ref fv i)]) |
| 167 |
(and |
| 168 |
(pair? a) |
| 169 |
(case (car a) |
| 170 |
[(mutable) (eqv? (car b) #t)] |
| 171 |
[(immutable) (eqv? (car b) #f)] |
| 172 |
[else #f]) |
| 173 |
(let ([a (cdr a)]) |
| 174 |
(and (pair? a) |
| 175 |
(null? (cdr a)) |
| 176 |
(eq? (car a) (cdr b)))) |
| 177 |
(f (+ i 1))))))))) |
| 178 |
(define make-nongenerative-rtd |
| 179 |
(lambda (name parent uid sealed? opaque? fields) |
| 180 |
(cond |
| 181 |
[(lookup-rtd uid) => |
| 182 |
(lambda (rtd) |
| 183 |
(unless |
| 184 |
(and ; must not check name! |
| 185 |
; (eqv? name (rtd-name rtd)) |
| 186 |
(eqv? parent (rtd-parent rtd)) |
| 187 |
(eqv? sealed? (rtd-sealed? rtd)) |
| 188 |
(eqv? opaque? (rtd-opaque? rtd)) |
| 189 |
(same-fields-as-rtd? fields rtd)) |
| 190 |
(die who "arguments not equivalent to those in an existing rtd" |
| 191 |
parent sealed? opaque? fields)) |
| 192 |
rtd)] |
| 193 |
[else |
| 194 |
(let ([rtd (generate-rtd name parent uid sealed? opaque? fields)]) |
| 195 |
(intern-rtd! uid rtd) |
| 196 |
rtd)]))) |
| 197 |
(define make-record-type-descriptor |
| 198 |
(lambda (name parent uid sealed? opaque? fields) |
| 199 |
(unless (symbol? name) |
| 200 |
(die who "not a valid record type name" name)) |
| 201 |
(unless (boolean? sealed?) |
| 202 |
(die who "not a valid sealed? argument" sealed?)) |
| 203 |
(unless (boolean? opaque?) |
| 204 |
(die who "not a valid opaque? argument" opaque?)) |
| 205 |
(cond |
| 206 |
[(symbol? uid) |
| 207 |
(make-nongenerative-rtd name parent uid sealed? opaque? fields)] |
| 208 |
[(eqv? uid #f) |
| 209 |
(generate-rtd name parent uid sealed? opaque? fields)] |
| 210 |
[else (die who "not a valid uid" uid)])))) |
| 211 |
|
| 212 |
(define-struct rcd (rtd prcd proc)) |
| 213 |
|
| 214 |
(define (is-parent-of? prtd rtd) |
| 215 |
(let ([p (rtd-parent rtd)]) |
| 216 |
(cond |
| 217 |
[(eq? p prtd) #t] |
| 218 |
[(not p) #f] |
| 219 |
[else (is-parent-of? prtd p)]))) |
| 220 |
|
| 221 |
(define (rtd-subtype? rtd parent-rtd) |
| 222 |
(unless (rtd? rtd) |
| 223 |
(die 'rtd-subtype? "not an rtd" rtd)) |
| 224 |
(unless (rtd? parent-rtd) |
| 225 |
(die 'rtd-substype? "not an rtd" parent-rtd)) |
| 226 |
(or (eq? rtd parent-rtd) |
| 227 |
(is-parent-of? parent-rtd rtd))) |
| 228 |
|
| 229 |
(define make-record-constructor-descriptor |
| 230 |
(lambda (rtd prcd protocol) |
| 231 |
(define who 'make-record-constructor-descriptor) |
| 232 |
(unless (rtd? rtd) |
| 233 |
(die who "not a record type descriptor" rtd)) |
| 234 |
(unless (or (not protocol) (procedure? protocol)) |
| 235 |
(die who "invalid protocol" protocol)) |
| 236 |
(let ([prtd (rtd-parent rtd)]) |
| 237 |
(cond |
| 238 |
[(not prcd) |
| 239 |
(make-rcd rtd #f protocol)] |
| 240 |
[(rcd? prcd) |
| 241 |
(unless (is-parent-of? (rcd-rtd prcd) rtd) |
| 242 |
(die who "descriptor does not apply" |
| 243 |
prcd rtd)) |
| 244 |
(make-rcd rtd prcd protocol)] |
| 245 |
[else |
| 246 |
(die who "not a valid record constructor descriptor" prcd)])))) |
| 247 |
|
| 248 |
(define (record-constructor rcd) |
| 249 |
(define who 'record-constructor) |
| 250 |
|
| 251 |
(define (split all-fields n) |
| 252 |
(let f ([ls all-fields] [n n]) |
| 253 |
(if (zero? n) |
| 254 |
(values '() ls) |
| 255 |
(if (pair? ls) |
| 256 |
(let-values ([(m p) (f (cdr ls) (- n 1))]) |
| 257 |
(values (cons (car ls) m) p)) |
| 258 |
(die 'record-constructor "insufficient arguments" |
| 259 |
all-fields))))) |
| 260 |
|
| 261 |
(define (constructor main-rtd size prcd proto) |
| 262 |
(define (fill i r flds f*) |
| 263 |
(cond |
| 264 |
[(null? flds) |
| 265 |
(if (null? f*) |
| 266 |
r |
| 267 |
(fill i r (car f*) (cdr f*)))] |
| 268 |
[else |
| 269 |
($struct-set! r i (car flds)) |
| 270 |
(fill (add1 i) r (cdr flds) f*)])) |
| 271 |
(if (not prcd) ;;; base |
| 272 |
(let ([n (rtd-size main-rtd)]) |
| 273 |
(define-syntax expand-setters |
| 274 |
(syntax-rules () |
| 275 |
[(_ r idx) #f] |
| 276 |
[(_ r idx a0 a* ...) |
| 277 |
(begin |
| 278 |
($struct-set! r idx a0) |
| 279 |
(expand-setters r (+ idx 1) a* ...))])) |
| 280 |
(define-syntax expand-constructor |
| 281 |
(syntax-rules (default) |
| 282 |
[(_ f* default) |
| 283 |
(lambda flds |
| 284 |
(unless (= (length flds) size) |
| 285 |
(apply die |
| 286 |
'a-record-constructor |
| 287 |
(format |
| 288 |
"expected ~a args, got ~a instead" |
| 289 |
n (length flds)) |
| 290 |
flds)) |
| 291 |
(let ([r ($make-struct main-rtd n)]) |
| 292 |
(fill 0 r flds f*)))] |
| 293 |
[(_ f* (args ...)) |
| 294 |
(lambda (args ...) |
| 295 |
(let ([r ($make-struct main-rtd n)]) |
| 296 |
(expand-setters r 0 args ...) |
| 297 |
(if (null? f*) |
| 298 |
r |
| 299 |
(fill (length '(args ...)) r (car f*) (cdr f*)))))])) |
| 300 |
(define-syntax expand-one-case |
| 301 |
(syntax-rules () |
| 302 |
[(_ arg-case) |
| 303 |
(if proto |
| 304 |
(lambda (f*) |
| 305 |
(let ([a-record-constructor |
| 306 |
(expand-constructor f* arg-case)]) |
| 307 |
(proto a-record-constructor))) |
| 308 |
(lambda (f*) |
| 309 |
(let ([a-record-constructor |
| 310 |
(expand-constructor f* arg-case)]) |
| 311 |
a-record-constructor)))])) |
| 312 |
(case size |
| 313 |
[(0) (expand-one-case ())] |
| 314 |
[(1) (expand-one-case (f0))] |
| 315 |
[(2) (expand-one-case (f0 f1))] |
| 316 |
[(3) (expand-one-case (f0 f1 f2))] |
| 317 |
[(4) (expand-one-case (f0 f1 f2 f3))] |
| 318 |
[else (expand-one-case default)])) |
| 319 |
(let ([pprcd (rcd-prcd prcd)] |
| 320 |
[sz (rtd-size (rcd-rtd prcd))]) |
| 321 |
(let ([p (constructor main-rtd sz pprcd (rcd-proc prcd))] |
| 322 |
[n (- size sz)] |
| 323 |
[protocol |
| 324 |
(if proto |
| 325 |
proto |
| 326 |
(lambda (new) |
| 327 |
(let ([a-record-constructor |
| 328 |
(lambda all-fields |
| 329 |
(let-values ([(parent-fields myfields) |
| 330 |
(split all-fields |
| 331 |
(- (length all-fields) |
| 332 |
(- size sz)))]) |
| 333 |
(apply (apply new parent-fields) |
| 334 |
myfields)))]) |
| 335 |
a-record-constructor)))]) |
| 336 |
(lambda (f*) |
| 337 |
(protocol |
| 338 |
(lambda fmls |
| 339 |
(lambda flds |
| 340 |
(unless (= (length flds) n) |
| 341 |
(apply die |
| 342 |
'a-record-constructor |
| 343 |
(format |
| 344 |
"expected ~a args, got ~a instead" |
| 345 |
n (length flds)) |
| 346 |
flds)) |
| 347 |
(apply (p (cons flds f*)) fmls))))))))) |
| 348 |
(unless (rcd? rcd) |
| 349 |
(die who "not a record constructor descriptor" rcd)) |
| 350 |
(let ([rtd (rcd-rtd rcd)] |
| 351 |
[prcd (rcd-prcd rcd)] |
| 352 |
[proto (rcd-proc rcd)]) |
| 353 |
((constructor rtd (rtd-size rtd) prcd proto) '()))) |
| 354 |
|
| 355 |
|
| 356 |
(define (record-accessor rtd k) |
| 357 |
(define who 'record-accessor) |
| 358 |
(unless (rtd? rtd) |
| 359 |
(die who "not an rtd" rtd)) |
| 360 |
(unless (and (fixnum? k) (fx>= k 0)) |
| 361 |
(die who "not a valid index" k)) |
| 362 |
(let ([sz (rtd-size rtd)] |
| 363 |
[p (rtd-parent rtd)]) |
| 364 |
(let ([i (if p (+ k (rtd-size p)) k)]) |
| 365 |
(unless (fx< i sz) |
| 366 |
(die who "not a valid index" k)) |
| 367 |
(let ([a-record-accessor |
| 368 |
(lambda (x) |
| 369 |
(cond |
| 370 |
[($struct/rtd? x rtd) ($struct-ref x i)] |
| 371 |
[($struct? x) |
| 372 |
(let ([xrtd ($struct-rtd x)]) |
| 373 |
(unless (rtd? xrtd) |
| 374 |
(die who "invalid type" x rtd)) |
| 375 |
(let f ([prtd (rtd-parent xrtd)] [rtd rtd] [x x] [i i]) |
| 376 |
(cond |
| 377 |
[(eq? prtd rtd) ($struct-ref x i)] |
| 378 |
[(not prtd) |
| 379 |
(die who "invalid type" x rtd)] |
| 380 |
[else (f (rtd-parent prtd) rtd x i)])))] |
| 381 |
[else (die who "invalid type" x rtd)]))]) |
| 382 |
a-record-accessor)))) |
| 383 |
|
| 384 |
(define (record-mutator rtd k) |
| 385 |
(define who 'record-mutator) |
| 386 |
(unless (rtd? rtd) |
| 387 |
(die who "not an rtd" rtd)) |
| 388 |
(unless (and (fixnum? k) (fx>= k 0)) |
| 389 |
(die who "not a valid index" k)) |
| 390 |
(let ([sz (rtd-size rtd)] |
| 391 |
[p (rtd-parent rtd)]) |
| 392 |
(let ([i (if p (+ k (rtd-size p)) k)]) |
| 393 |
(unless (fx< i sz) |
| 394 |
(die who "not a valid index" k)) |
| 395 |
(unless (car (vector-ref (rtd-fields rtd) k)) |
| 396 |
(die who "field is not mutable" k rtd)) |
| 397 |
(let ([a-record-mutator |
| 398 |
(lambda (x v) |
| 399 |
(cond |
| 400 |
[($struct/rtd? x rtd) ($struct-set! x i v)] |
| 401 |
[($struct? x) |
| 402 |
(let ([xrtd ($struct-rtd x)]) |
| 403 |
(unless (rtd? xrtd) |
| 404 |
(die who "invalid type" x rtd)) |
| 405 |
(let f ([prtd (rtd-parent xrtd)] [rtd rtd] [x x] [i i] [v v]) |
| 406 |
(cond |
| 407 |
[(eq? prtd rtd) ($struct-set! x i v)] |
| 408 |
[(not prtd) |
| 409 |
(die who "invalid type" x rtd)] |
| 410 |
[else (f (rtd-parent prtd) rtd x i v)])))] |
| 411 |
[else (die who "invalid type" x rtd)]))]) |
| 412 |
a-record-mutator)))) |
| 413 |
|
| 414 |
(define (record-predicate rtd) |
| 415 |
(define who 'record-predicate) |
| 416 |
(unless (rtd? rtd) |
| 417 |
(die who "not an rtd" rtd)) |
| 418 |
(let ([sz (rtd-size rtd)] |
| 419 |
[p (rtd-parent rtd)]) |
| 420 |
(let ([a-record-predicate |
| 421 |
(lambda (x) |
| 422 |
(cond |
| 423 |
[($struct/rtd? x rtd) #t] |
| 424 |
[($struct? x) |
| 425 |
(let ([xrtd ($struct-rtd x)]) |
| 426 |
(and (rtd? xrtd) |
| 427 |
(let f ([prtd (rtd-parent xrtd)] [rtd rtd]) |
| 428 |
(cond |
| 429 |
[(eq? prtd rtd) #t] |
| 430 |
[(not prtd) #f] |
| 431 |
[else (f (rtd-parent prtd) rtd)]))))] |
| 432 |
[else #f]))]) |
| 433 |
a-record-predicate))) |
| 434 |
|
| 435 |
|
| 436 |
(define (record-field-mutable? rtd k) |
| 437 |
(define who 'record-field-mutable?) |
| 438 |
(unless (rtd? rtd) |
| 439 |
(die who "not an rtd" rtd)) |
| 440 |
(unless (and (fixnum? k) (fx>= k 0)) |
| 441 |
(die who "not a valid index" k)) |
| 442 |
(let ([sz (rtd-size rtd)] |
| 443 |
[p (rtd-parent rtd)]) |
| 444 |
(let ([i (if p (+ k (rtd-size p)) k)]) |
| 445 |
(unless (fx< i sz) |
| 446 |
(die who "not a valid index" k)) |
| 447 |
(car (vector-ref (rtd-fields rtd) k))))) |
| 448 |
|
| 449 |
(set-rtd-printer! (type-descriptor rtd) |
| 450 |
(lambda (x p wr) |
| 451 |
(display (format "#<record-type-descriptor ~s>" (rtd-name x)) p))) |
| 452 |
|
| 453 |
(set-rtd-printer! (type-descriptor rcd) |
| 454 |
(lambda (x p wr) |
| 455 |
(display (format "#<record-constructor-descriptor ~s>" |
| 456 |
(rtd-name (rcd-rtd x))) p))) |
| 457 |
|
| 458 |
) |
| 459 |
|
| 460 |
|
| 461 |
#!eof |
| 462 |
|
| 463 |
rtd0 fields=4 |
| 464 |
proto0 = |
| 465 |
(lambda (n) |
| 466 |
(lambda (p0-fmls ...) |
| 467 |
(n f0 f1 f2 f3))) |
| 468 |
|
| 469 |
rtd1 fields=2 |
| 470 |
proto1 = |
| 471 |
(lambda (n) |
| 472 |
(lambda (p1-fmls ...) |
| 473 |
((n p0-acts ...) f4 f5))) |
| 474 |
|
| 475 |
rtd2 fields=1 |
| 476 |
proto2 = |
| 477 |
(lambda (n) |
| 478 |
(lambda (p2-fmls ...) |
| 479 |
((n p1-acts ...) f6))) |
| 480 |
|
| 481 |
|
| 482 |
(record-constructor rcd2) |
| 483 |
== |
| 484 |
(proto2 (lambda p1-fml* |
| 485 |
(lambda (f6) |
| 486 |
(apply (proto1 (lambda p0-fml* |
| 487 |
(lambda (f4 f5) |
| 488 |
(apply (proto0 (lambda (f0 f1 f2 f3) |
| 489 |
($record rtd2 f0 f1 f2 f3 f4 f5 f6))) |
| 490 |
p0-fml*)))) |
| 491 |
p1-fml*)))) |
| 492 |
|
| 493 |
new0 = (lambda (f0 f1 f2 f3 f4 f5 f6) |
| 494 |
($record rtd2 f0 f1 f2 f3 f4 f5 f6)) |
| 495 |
|
| 496 |
(record-constructor rcd2) |
| 497 |
== |
| 498 |
(proto2 (lambda p1-fml* |
| 499 |
(lambda (f6) |
| 500 |
(apply (proto1 (lambda p0-fml* |
| 501 |
(lambda (f4 f5) |
| 502 |
(apply (proto0 (lambda (f0 f1 f2 f3) |
| 503 |
(new0 f0 f1 f2 f3 f4 f5 f6))) |
| 504 |
p0-fml*)))) |
| 505 |
p1-fml*)))) |
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|