div_test   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm

Implementation

;; using flatmap explicity
(bind-func div_test:[ADOption*,ADOption*,ADOption*]*
  (lambda (a b)
    (flatmap
     a (lambda (n) ;; numerator
         (flatmap
          b (lambda (d) ;; denominator
              (if (= d 0)
                  (ADNone)
                  (ADSome (/ n d)))))))))


Back to Index

Similar Entries

  • Cdiv    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • Complex_division_bybuf    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_division_bybuf    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • MyLittleCleanupTest    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • Rational_greatest_common_divisor    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • Vdiv    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • array-test2    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • array-test3    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • beat_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/scheduler.xtm
  • callback-test2-helper    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • clock_test_a    xtlang    /digego/extempore/tree/v0.8.9/examples/core/scheduler.xtm
  • clock_test_b    xtlang    /digego/extempore/tree/v0.8.9/examples/core/scheduler.xtm
  • div    xtlang    /digego/extempore/tree/v0.8.9/tests/core/generics.xtm
  • div    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • div_test    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • div_test    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • div_test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • div_test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • div_test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • divergence    macro    /digego/extempore/tree/v0.8.9/libs/contrib/cas.xtm
  • divide-and-conquer    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • divisors    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/word_count.xtm
  • divisors    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/word_count.xtm
  • eq_test2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • global_var_test1    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • global_var_test1b    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • gmp_test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gmp.xtm
  • hl_test1a    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • hl_test1b    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • impc:ti:nativef-generics-final-tests    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • map_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • map_test2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • my-inc-test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-1    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-1    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-10    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-11    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-12    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-13    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-1f    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-3    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-4    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-6    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-7    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-8    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test-9    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test14    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test15    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test16    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test17    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test18    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test19    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test20    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test25    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test26    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test27    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test28    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • my-test29    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • num_f32_div    xtlang    /digego/extempore/tree/v0.8.9/tests/core/generics.xtm
  • num_f32_div    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • num_f64_div    xtlang    /digego/extempore/tree/v0.8.9/tests/core/generics.xtm
  • num_f64_div    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • num_i32_div    xtlang    /digego/extempore/tree/v0.8.9/tests/core/generics.xtm
  • num_i32_div    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • num_i64_div    xtlang    /digego/extempore/tree/v0.8.9/tests/core/generics.xtm
  • num_i64_div    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • opengl-test    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • opengl-test    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/horde3d_knight.xtm
  • opengl-test    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • opengl-test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/bullet.xtm
  • pairs_test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • pmap_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • pmap_test2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • queue_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • sys_g_file_test    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glib.xtm
  • test    scheme    /digego/extempore/tree/v0.8.9/examples/core/topclock_metro.xtm
  • test    scheme    /digego/extempore/tree/v0.8.9/examples/core/synth.xtm
  • test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/rtmidi.xtm
  • test    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.xtm
  • test    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/convolution.xtm
  • test    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • test    scheme    /digego/extempore/tree/v0.8.9/examples/external/convolution_reverb.xtm
  • test1    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/drawing.xtm
  • test2    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/drawing.xtm
  • test3    xtlang    /digego/extempore/tree/v0.8.9/libs/external/udis86.xtm
  • test34    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test34    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test35    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test36    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test37    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test38    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test39    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test44    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test45    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test46    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test808    scheme    /digego/extempore/tree/v0.8.9/examples/external/electrofunk.xtm
  • test_1    xtlang    /digego/extempore/tree/v0.8.9/tests/core/constraints.xtm
  • test_1    xtlang    /digego/extempore/tree/v0.8.9/tests/core/constraints.xtm
  • test_1    xtlang    /digego/extempore/tree/v0.8.9/tests/core/constraints.xtm
  • test_add_blinker    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • test_assoc_1    xtlang    /digego/extempore/tree/v0.8.9/tests/core/adt.xtm
  • test_blink_blinker    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • test_div    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • test_double_blink_blinker    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • test_g_array11    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_array2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_array3    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_cstring    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_cstring1    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_ptr0    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_ptr1    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_g_tuple    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • test_stream_2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/audio_streams.xtm
  • test_stream_3    xtlang    /digego/extempore/tree/v0.8.9/examples/core/audio_streams.xtm
  • test_stream_4    xtlang    /digego/extempore/tree/v0.8.9/examples/core/audio_streams.xtm
  • test_world_copy    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • test_world_foo    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • test_world_indexing    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • test_world_periodic_bc    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • testeither    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • testinc    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • testitall    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/word_count.xtm
  • testprint    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • testprint    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • testprint    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • teststart    scheme    /digego/extempore/tree/v0.8.9/examples/core/topclock_metro.xtm
  • testvsinecos    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • type_class_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/typeclasses.xtm
  • vector-test2    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • vector_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • vector_test_a    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • vsdiv    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vsdiv    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vtest    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • vtest_a    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • vtest_b    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • vtest_c    xtlang    /digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/rational.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math_ext.xtm
  • xtm_division    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math_ext.xtm
  • xtmtest    macro    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest    macro    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-compile    macro    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-compile    macro    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-print-results    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-print-results    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-reset-results    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-reset-results    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-result    macro    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-result    macro    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-result-body    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-result-body    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-run-tests    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-run-tests    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-update-test-result    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-update-test-result    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-with-fixture    macro    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-with-fixture-body    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-with-fixture-body    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • zip_array_test    xtlang    /digego/extempore/tree/v0.8.9/tests/core/constraints.xtm
  • zip_array_test    xtlang    /digego/extempore/tree/v0.8.9/tests/core/constraints.xtm