Hi,
I get the following error message:
[gergoe@flagship sandbox]$ urweb mapm
/home/gergoe/local/sandbox/mapm.ur:12:45-12:56: Anonymous function
remains at code generation
Function: (fn n : FFI(Basis.int) => 0)
:0:0-0:0: Anonymous function remains at code generation
Function:
(fn _ : {} => (let sources : list(source) = (UNBOUND_1 {}) in ({})))
which I do not see how to correct. The point would be to have a list
of source ints, bundled into a transaction monad to do operations
later. Probably my idea is mistaken.
[gergoe@flagship sandbox]$ cat mapm.ur
fun tabulate n f =
let
fun tabulate' k =
if (k=n)
then []
else (f k) :: tabulate' (k+1)
in
tabulate' 0
end
fun main () =
sources <- List.mapM source (tabulate 12 (fn n => 0));
return <xml/>
[gergoe@flagship sandbox]$ cat mapm.urp
$/list
mapm
[gergoe@flagship sandbox]$ cat mapm.urs
val main : {} -> transaction page
- Gergely
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur