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

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -