Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let pol a b c =
- let p=(a+.b+.c)/.2.0 in sqrt(p*.(p-.a)*.(p-.b)*.(p-.c));;
- let test a b c =
- (a+.b)>c &&(b+.c)>a &&(a+.c)>b
- let main a b c =
- let w=test(a b c) in(
- if w
- then pol (a b c)
- else raise(Failure "Error"));;
- # let f a b = a + b;;
- val f : int -> int -> int = <fun>
- # f 3 8;;
- - : int = 11
- # f (3 8);;
- Error: This expression has type int
- This is not a function; it cannot be applied.
Add Comment
Please, Sign In to add comment