do   macro


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

Implementation

;;;; (do ((var init inc) ...) (endtest result ...) body ...)
;;
(macro do
       (lambda (do-macro)
         (apply (lambda (do vars endtest . body)
                  (let ((do-loop (gensym)))
                    `(letrec ((,do-loop
                               (lambda ,(map (lambda (x)
                                               (if (pair? x) (car x) x))
                                             `,vars)
                                       (if ,(car endtest)
                                           (begin ,@(cdr endtest))
                                           (begin
                                             ,@body
                                             (,do-loop
                                              ,@(map (lambda (x)
                                                       (cond
                                                        ((not (pair? x)) x)
                                                        ((< (length x) 3) (car x))
                                                        (else (car (cdr (cdr x))))))
                                                     `,vars)))))))
                       (,do-loop
                        ,@(map (lambda (x)
                                 (if (and (pair? x) (cdr x))
                                     (car (cdr x))
                                     '()))
                               `,vars)))))
                do-macro)))


Back to Index

Similar Entries

  • GUI_window    xtlang
  • PARAM_RANDOM    scheme
  • PARAM_RANDOM    scheme
  • Vdot    xtlang
  • Windows-add-libdir-to-PATH    scheme
  • Windows-convert-unix-path    scheme
  • async_done    xtlang
  • bindfunc_with_docstring    xtlang
  • bindfunc_with_zone_size_and_docstring    xtlang
  • bitmap_from_window    xtlang
  • cpvdot    xtlang
  • decompose_domain    xtlang
  • dof-frag    scheme
  • dome    scheme
  • dome    scheme
  • dot_product    xtlang
  • dotill    macro
  • dotimes    macro
  • doubler    scheme
  • eq_double_equal    xtlang
  • gdouble_alloc    xtlang
  • gdouble_halloc    xtlang
  • gdouble_zalloc    xtlang
  • generate_And_Wrap_Pseudorandom_DNA_Sequence    xtlang
  • generate_random_vao    xtlang
  • get_LCG_Pseudorandom_Number    xtlang
  • get_download_handler    xtlang
  • get_window    xtlang
  • glfw_create_fullscreen_interaction_window    xtlang
  • glfw_create_fullscreen_interaction_window    xtlang
  • glfw_create_fullscreen_window    xtlang
  • glfw_create_fullscreen_window    xtlang
  • glfw_create_interaction_window    xtlang
  • glfw_create_window    xtlang
  • glfw_destroy_window    xtlang
  • glfw_get_window_height    xtlang
  • glfw_get_window_width    xtlang
  • glfw_init_and_create_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_interaction_compatibility_window    xtlang
  • glfw_init_and_create_interaction_window    xtlang
  • glfw_init_and_create_window    xtlang
  • glfw_window_focus_callback:GLFWwindowfocusfun    xtlang
  • glfw_window_position_callback:GLFWwindowposfun    xtlang
  • glfw_window_should_close    xtlang
  • godot_alloc    xtlang
  • godot_array    xtlang
  • godot_array_append    xtlang
  • godot_array_clear    xtlang
  • godot_array_destroy    xtlang
  • godot_array_get    xtlang
  • godot_array_new    xtlang
  • godot_array_size    xtlang
  • godot_bool_pvar    xtlang
  • godot_bool_var    xtlang
  • godot_call    xtlang
  • godot_call    xtlang
  • godot_call    xtlang
  • godot_call    xtlang
  • godot_color_get_r    xtlang
  • godot_color_new_rgb    xtlang
  • godot_color_set_r    xtlang
  • godot_global_get_singleton    xtlang
  • godot_method_bind_call    xtlang
  • godot_method_bind_get_method    xtlang
  • godot_method_bind_ptrcall    xtlang
  • godot_node_path_destroy    xtlang
  • godot_node_path_new    xtlang
  • godot_string    xtlang
  • godot_string_ascii    xtlang
  • godot_string_destroy    xtlang
  • godot_string_new    xtlang
  • godot_string_parse_utf8    xtlang
  • godot_string_pvar    xtlang
  • godot_string_var    xtlang
  • godot_variant_as_int    xtlang
  • godot_variant_as_object    xtlang
  • godot_variant_as_real    xtlang
  • godot_variant_as_string    xtlang
  • godot_variant_get_type    xtlang
  • godot_variant_new_aabb    xtlang
  • godot_variant_new_basis    xtlang
  • godot_variant_new_bool    xtlang
  • godot_variant_new_color    xtlang
  • godot_variant_new_int    xtlang
  • godot_variant_new_nil    xtlang
  • godot_variant_new_node_path    xtlang
  • godot_variant_new_plane    xtlang
  • godot_variant_new_quat    xtlang
  • godot_variant_new_real    xtlang
  • godot_variant_new_rect2    xtlang
  • godot_variant_new_string    xtlang
  • godot_variant_new_transform    xtlang
  • godot_variant_new_transform2d    xtlang
  • godot_variant_new_vector2    xtlang
  • godot_variant_new_vector3    xtlang
  • godot_vector2_new    xtlang
  • godot_vector2_pvar    xtlang
  • godot_vector2_set_x    xtlang
  • godot_vector2_set_y    xtlang
  • godot_vector2_var    xtlang
  • godot_vector3_new    xtlang
  • godot_vector3_pvar    xtlang
  • godot_vector3_var    xtlang
  • gui_shutdown    xtlang
  • gui_window_size_callback    xtlang
  • half_rectangular_window_func    xtlang
  • half_rectangular_window_func2    xtlang
  • hamming_window_func    xtlang
  • hanning_window_func    xtlang
  • has_document    xtlang
  • impc:aot:do-and-emit    macro
  • impc:aot:do-at-runtime    macro
  • impc:aot:do-or-emit    macro
  • impc:aot:suppress-aot-do    macro
  • impc:compiler:print-double-colon-error    scheme
  • impc:compiler:print-shadow-var-error    scheme
  • impc:ti:doloop    scheme
  • impc:ti:dotimes    scheme
  • impc:ti:dotimes-check    scheme
  • impc:ti:gen-shadow    scheme
  • impc:ti:get-builtin-docstring    scheme
  • impc:ti:get-closure-docstring    scheme
  • impc:ti:get-closure-or-nativefunc-docstring    scheme
  • impc:ti:get-globalvar-docstring    scheme
  • impc:ti:get-namedtype-docstring    scheme
  • impc:ti:get-nativefunc-docstring    scheme
  • impc:ti:get-polyfunc-docstring    scheme
  • impc:ti:get-typealias-docstring    scheme
  • impc:ti:get-xtmacro-docstring    scheme
  • impc:ti:rename-all-shadow-vars    scheme
  • impc:ti:set-builtin-docstring    scheme
  • impc:ti:set-closure-docstring    scheme
  • impc:ti:set-globalvar-docstring    scheme
  • impc:ti:set-namedtype-docstring    scheme
  • impc:ti:set-nativefunc-docstring    scheme
  • impc:ti:set-typealias-docstring    scheme
  • impc:ti:set-xtmacro-docstring    scheme
  • impc:ti:word-downcase    scheme
  • is_touch_down    xtlang
  • kinect-shutdown    xtlang
  • make_window_transparent    xtlang
  • ocv_namedWindow    xtlang
  • ocv_namedWindow    xtlang
  • ocv_namedWindow    scheme
  • ocv_namedWindow1    xtlang
  • ocv_namedWindow2    xtlang
  • ocv_scheme_release_window    xtlang
  • osc_send_one_double    xtlang
  • osc_send_two_double    xtlang
  • pc:random    scheme
  • rados-connect-to-cluster    xtlang
  • rados-connect-to-pool    xtlang
  • rados-disconnect-cluster    xtlang
  • rados-pool-create    xtlang
  • random    scheme
  • random    xtlang
  • random-next    scheme
  • rectangular_window_func    xtlang
  • return_ptr_gv_first_with_docstring    xtlang
  • return_ptr_gv_second_with_docstring    xtlang
  • set_window_wndproc    xtlang
  • sys_file_open_stdout    xtlang
  • test_double_blink_blinker    xtlang
  • triangular_window_func    xtlang
  • unix-or-Windows    macro
  • vvdot    xtlang
  • vvdot    xtlang
  • window_hamming    xtlang
  • window_hamming    xtlang
  • window_hanning    xtlang
  • window_hanning    xtlang
  • xt_pcg32_random    xtlang
  • xt_pcg32_random_r    xtlang
  • xt_pcg32_srandom    xtlang
  • xt_pcg32_srandom_r    xtlang
  • xtdoubler    xtlang
  • xtm-closure-doc    macro
  • xtm_dof    xtlang
  • xtm_dof    xtlang
  • xtm_dof    xtlang
  • xtm_dof    xtlang
  • xtm_dof    xtlang
  • xtm_dof    xtlang
  • xtm_dof_fx    xtlang
  • xtm_dof_fx    xtlang
  • xtm_dof_fx    xtlang
  • xtm_dof_fx    xtlang
  • xtm_dof_fx    xtlang
  • xtm_render_init_dof_shader    xtlang
  • xtm_shadow_fbo    xtlang
  • xtmdoc-alist-lessthan    scheme
  • xtmdoc-all-doc-alists    scheme
  • xtmdoc-builtin-handler    scheme
  • xtmdoc-clean-nativefunc-alist    scheme
  • xtmdoc-closure-handler    scheme
  • xtmdoc-documentation-function    scheme
  • xtmdoc-export-caches-to-json    scheme
  • xtmdoc-genericfunc-handler    scheme
  • xtmdoc-generictype-handler    scheme
  • xtmdoc-get-args-from-form    scheme
  • xtmdoc-get-xtlang-genericfunc-args    scheme
  • xtmdoc-globalvar-handler    scheme
  • xtmdoc-namedtype-handler    scheme
  • xtmdoc-nativefunc-handler    scheme
  • xtmdoc-polyfunc-handler    scheme
  • xtmdoc-polytype-handler    scheme
  • xtmdoc-scheme-function-handler    scheme
  • xtmdoc-scheme-macro-handler    scheme
  • xtmdoc-strip-arg-type-annotations    scheme
  • xtmdoc-typealias-handler    scheme
  • xtmdoc-write-alist-args-as-json    scheme
  • xtmdoc-write-alist-as-json    scheme