no title   macro


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

(macro
 quasiquote
 (lambda (l)
   (define (mcons f l r)
     (if (and (pair? r)
              (eq? (car r) 'quote)
              (eq? (car (cdr r)) (cdr f))
              (pair? l)
              (eq? (car l) 'quote)
              (eq? (car (cdr l)) (car f)))
         (if (or (procedure? f) (number? f) (string? f))
             f
             (list 'quote f))
         (if (eqv? l vector)
             (apply l (eval r))
             (list 'cons l r)
             )))
   (define (mappend f l r)
     (if (or (null? (cdr f))
             (and (pair? r)
                  (eq? (car r) 'quote)
                  (eq? (car (cdr r)) '())))
         l
         (list 'append l r)))
   (define (foo level form)
     (cond ((not (pair? form))
            (if (or (procedure? form) (number? form) (string? form))
                form
                (list 'quote form))
            )
           ((eq? 'quasiquote (car form))
            (mcons form ''quasiquote (foo (+ level 1) (cdr form))))
           (#t (if (zero? level)
                   (cond ((eq? (car form) 'unquote) (car (cdr form)))
                         ((eq? (car form) 'unquote-splicing)
                          (error "Unquote-splicing wasn't in a list:"
                                 form))
                         ((and (pair? (car form))
                               (eq? (car (car form)) 'unquote-splicing))
                          (mappend form (car (cdr (car form)))
                                   (foo level (cdr form))))
                         (#t (mcons form (foo level (car form))
                                    (foo level (cdr form)))))
                   (cond ((eq? (car form) 'unquote)
                          (mcons form ''unquote (foo (- level 1)
                                                     (cdr form))))
                         ((eq? (car form) 'unquote-splicing)
                          (mcons form ''unquote-splicing
                                 (foo (- level 1) (cdr form))))
                         (#t (mcons form (foo level (car form))
                                    (foo level (cdr form)))))))))
   (foo 0 (car (cdr l)))))


Back to Index

Similar Entries

  • BTree_walk_inorder    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • LFO_OPT_NOTEDUR    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_NOISE_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_NOISE_AMP    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_NOISE_AMP    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PARAM_Notch    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • PARAM_Notch    scheme    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • PmEvent_note_off_p    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • PmEvent_note_on_p    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • Widget_find_inorder    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • Widget_walk_inorder    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • active_notes    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • active_notes    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/audiosetup.xtm
  • aiProcess_FixInfacingNormals    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_GenNormals    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • aiProcess_GenSmoothNormals    scheme    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • ai_build_node    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • ai_find_matching_node    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • analogueVec_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue.xtm
  • analogue_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue.xtm
  • basic_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/basicsynth.xtm
  • binomial    macro    /digego/extempore/tree/v0.8.9/libs/contrib/cas.xtm
  • cerberus_get_noisetype    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cerberus_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus.xtm
  • cerberus_sub_noise_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/cerberus_midi.xtm
  • cl:delete-if-not    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cl:notany    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cl:notevery    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cl:remove-if-not    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • close-note-gate    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • cpvnormalize    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk/cpVect.xtm
  • create_fbo_no_depth    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • create_fbo_no_depth_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • dl_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dl_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dlogue_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/dlogue.xtm
  • dv_draw_title    xtlang    /digego/extempore/tree/v0.8.9/libs/external/datavis.xtm
  • find_node    xtlang    /digego/extempore/tree/v0.8.9/examples/core/godot_test1.xtm
  • fleet_connect_to_nodes    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet.xtm
  • fleet_message_all_nodes_sync    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet.xtm
  • fleet_message_node_sync    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet.xtm
  • fmsynth_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/fmsynth.xtm
  • generate_tri_normals    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender4.xtm
  • get_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • get_noise_type    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • get_noisetype    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • gl_print_error_no_msg    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • godot_node_path_destroy    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • godot_node_path_new    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • godot_variant_new_node_path    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libgodot.xtm
  • gui_find_leaf_inorder    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • gui_set_monokai_color_theme    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • gui_set_monokai_opensans_theme    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • homo-play-midi-note    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi-scm.xtm
  • homo-play-midi-note    scheme    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • impc:compiler:print-cannot-expand-non-generic-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-could-not-resolve-generic-type-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-could-not-resolve-type-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-could-not-resolve-types    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-could-not-resolve-types_find-expr    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-no-redefinitions-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-no-retval-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-no-scheme-stub-notification    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-no-valid-forms-for-generic-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-not-during-aot-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:compiler:print-variable-not-marked-as-free-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:bitwise-not-to-eor    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:get-mono-name    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:not    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:type-normalize    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • instrument_find_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments.xtm
  • make_mono    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • midi-note-off    scheme    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • midi-note-on    scheme    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • midi_note_off    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • midi_note_off    xtlang    /digego/extempore/tree/v0.8.9/examples/core/midi_synth.xtm
  • midi_note_off    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/midisetup.xtm
  • midi_note_on    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • midi_note_on    xtlang    /digego/extempore/tree/v0.8.9/examples/core/midi_synth.xtm
  • midi_note_on    xtlang    /digego/extempore/tree/v0.8.9/examples/sharedsystem/midisetup.xtm
  • no title    unknown    /digego/extempore/tree/v0.8.9/libs/contrib/mpi.xtm
  • no title    unknown    /digego/extempore/tree/v0.8.9/libs/contrib/mpi.xtm
  • no title    unknown    /digego/extempore/tree/v0.8.9/libs/contrib/mpi.xtm
  • no title    unknown    /digego/extempore/tree/v0.8.9/libs/contrib/mpi.xtm
  • no title    unknown    /digego/extempore/tree/v0.8.9/libs/external/gl/glcore-glew.xtm
  • node_reply_function    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • node_reply_loop    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • node_reply_loop_stop    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • node_reply_socket_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • nof    macro    /digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-request.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-reply.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-respondent.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-surveyor.xtm
  • normal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math_ext.xtm
  • note-active    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • note-activity    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • note-grad    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • note-pitch    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • peppino    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/shadowmap.xtm
  • peppino    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/multilight.xtm
  • play-midi-note    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi-scm.xtm
  • play-midi-note    scheme    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • play-note    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • reload_ignore_cache    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • sampler-parse-midinote-filename    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • sampler_note    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • sampler_note_linear    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • saw_synth_note_c    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/polysynth.xtm
  • saw_synth_note_c    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/polysynth.xtm
  • scientific-pitch-notation-to-midi-number    scheme    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext-scm.xtm
  • set_monophonic    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • set_noise_amp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • set_noise_type    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/instrument_params.xtm
  • start-note    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • stop-note    scheme    /digego/extempore/tree/v0.8.9/libs/core/instruments-scm.xtm
  • sub_noise_cc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments/analogue_midi.xtm
  • sys:with-noisy-compiler    macro    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • t:notype?    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • vnormalise    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vnormalise    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_notequal    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_play_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments.xtm
  • xtm_point_along_path_norm    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/openvg.xtm
  • xtm_release_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments.xtm
  • xtm_start_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments.xtm
  • xtm_stop_note    xtlang    /digego/extempore/tree/v0.8.9/libs/core/instruments.xtm
  • xtmdoc-strip-arg-type-annotations    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • xtmfrag_nolight    scheme    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline-scm.xtm