home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d556 / scheme2c.lha / Scheme2C / Scheme-src.lzh / scsc / miscexp.sch < prev    next >
Text File  |  1991-10-11  |  2KB  |  56 lines

  1. ;;; External and in-line definitions for miscexp.sc
  2.  
  3. (define-in-line ($CALL? x) (and (pair? x) (eq? (car x) '$call)))
  4.  
  5. (define-in-line ($CALL-TAIL x) (and ($call? x) (cadr x)))
  6.  
  7. (define-in-line (SET-$CALL-TAIL! x v) (set-car! (cdr x) v))
  8.  
  9. (define-in-line ($CALL-FUNC x) (and ($call? x) (caddr x)))
  10.  
  11. (define-in-line (SET-$CALL-FUNC! x f) (set-car! (cddr x) f))
  12.  
  13. (define-in-line ($CALL-ARGL x) (and ($call? x) (cdddr x)))
  14.  
  15. (define-in-line (SET-$CALL-ARGL! x al) (set-cdr! (cddr x) al))
  16.  
  17. (define-in-line ($LAP? x) (and (pair? x) (eq? (car x) '$lap)))
  18.  
  19. (define-in-line ($LAP-TYPE x) (and ($lap? x) (cadr x)))
  20.  
  21. (define-in-line ($LAP-VARS x) (and ($lap? x) (caddr x)))
  22.  
  23. (define-in-line ($LAP-BODY x) (and ($lap? x) (cdddr x)))
  24.  
  25. (define-in-line (SET-$LAP-BODY! exp body) (set-cdr! (cddr exp) body))
  26.  
  27. (define-in-line ($SET? x) (and (pair? x) (eq? (car x) '$set)))
  28.  
  29. (define-in-line ($SET-ID x) (and ($set? x) (cadr x)))
  30.  
  31. (define-in-line ($SET-EXP x) (and ($set? x) (caddr x)))
  32.  
  33. (define-in-line (SET-$SET-EXP! x e) (set-car! (cddr x) e))
  34.  
  35. (define-in-line ($IF? x) (and (pair? x) (eq? (car x) '$if)))
  36.  
  37. (define-in-line ($IF-TEST x) (and ($if? x) (cadr x)))
  38.  
  39. (define-in-line (SET-$IF-TEST! x test) (set-car! (cdr x) test))
  40.  
  41. (define-in-line ($IF-TRUE x) (and ($if? x) (caddr x)))
  42.  
  43. (define-in-line (SET-$IF-TRUE! x v) (set-car! (cddr x) v))
  44.  
  45. (define-in-line ($IF-FALSE x) (and ($if? x) (cadddr x)))
  46.  
  47. (define-in-line (SET-$IF-FALSE! x v) (set-car! (cdddr x) v))
  48.  
  49. (define-in-line ($DEFINE? x) (and (pair? x) (eq? (car x) '$define)))
  50.  
  51. (define-in-line ($DEFINE-ID x) (and ($define? x) (cadr x)))
  52.  
  53. (define-in-line ($DEFINE-EXP x) (and ($define? x) (caddr x)))
  54.  
  55. (define-in-line (SET-$DEFINE-EXP! x e) (set-car! (cddr x) e))
  56.