1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package bonsai
-
bonsai
-
-
bonsai.bench
-
bonsai.example_chat_open_source_native
-
bonsai.example_chat_open_source_native_common
-
-
bonsai.extra
-
-
bonsai.focus_ring
-
bonsai.protocol
-
bonsai.tailwind_colors
-
bonsai.test
-
bonsai.test.dot
-
bonsai.web_test
-
bonsai.web_ui_common_components
-
bonsai.web_ui_drag_and_drop
-
bonsai.web_ui_element_size_hooks
-
bonsai.web_ui_file
-
bonsai.web_ui_file_from_web_file
-
bonsai.web_ui_form
-
-
bonsai.web_ui_freeform_multiselect
-
bonsai.web_ui_multi_select
-
-
bonsai.web_ui_query_box
-
bonsai.web_ui_reorderable_list
-
bonsai.web_ui_typeahead
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val flatten_values :
( 'model, 'dynamic_action, 'static_action, 'result ) Computation.t ->
( 'model, 'dynamic_action, 'static_action, 'result ) Computation.t
Traverses a computation to reach the values within. Any values of the form
both a (both b c)
are transformed to
map3 a b c ~f:(fun a b c -> a, (b, c))
since this generates fewer incremental nodes, thus leading to better performance. The same optimization gets applied for up to 7 nodes both'd together. A similar optimization is applied to nodes of the form
map (both a b) ~f
which get turned into
map2 a b ~f:(fun a b -> f (a, b))
since, again, this generates fewer incremental nodes. As with the previous transformation, this generalizes to an arity of 7.