pattern matching - how to to do the "noop but return unit" in OCaml -
I want to print a list of stars after matching a pattern to join this powerful function
How can I show "nothing but the return unit" operation?
What do I mean:
print_node node = with match nodes [] - & gt; (* * I want to do noop * here). S :: t - & gt; Print_string; You can only write ()
.
/ P>
Look in the manual: ()
how do you create the unit
value.
Comments
Post a Comment