vault backup: 2023-09-12 16:13:32
This commit is contained in:
@ -72,6 +72,12 @@ Error: should have int type (*because of the hidden else*)
|
||||
|
||||
# let print_even n =
|
||||
if n mod 2 = 0 then
|
||||
print_int n ;
|
||||
print_newline()
|
||||
|
||||
begin
|
||||
print_int n ;
|
||||
print_newline()
|
||||
end;; (*begin and end used to execute more than 1 function into a if*)
|
||||
val print_even : int -> unit = <fun>
|
||||
|
||||
# print_even 4;;
|
||||
4
|
||||
-: unit = ()
|
||||
|
Reference in New Issue
Block a user