Hi, I have this example function
fun fnct :: " nat ⇒ nat ⇒ (nat × nat)" where
"fnct x y = (
let s = x+y;
d = x-y in (s, d))"
If I don't want to use tuples, the only way to return objects is with a record, right? Or is it somehow possible to return more objects with functions? Something like this, I mean
fun fnct :: " nat ⇒ nat ⇒ (nat ⇒ nat)" where ...
In general: record or datatype.
Last updated: Dec 21 2024 at 16:20 UTC