-1

this my problem, I want to call the same function, which has a base case with a return value, twice, and don't know how to do it; this is what I want to do:

let rec hello = 
(*some code*)
| And(a, b) -> let a =  hello(a, l) in let b = hello(b, l)(*I dont even need the a or b*)
(*some code*)

The whole point is just invoking the same function on those parameters, which will then do their own work, which works, since I've tested it with just one call.

ShahrukhKhan
  • 365
  • 1
  • 3
  • 11
  • can you please describe your problem more clearly? or maybe you can show us an example in Java or other imperative language – Jackson Tale Feb 08 '14 at 10:26

1 Answers1

0

I suppose that return value of hello is unit.

let rec hello = 
(*some code*)
| And(a, b) -> 
   let () = hello(a, l) in 
   let () = hello(b, l) in 
   ()
(*some code*)
Kakadu
  • 2,837
  • 19
  • 29