So I was writing up some code in standard ML, and trying to compile it with smlnj. I got the following error:
is it possible to g开发者_如何学编程et element from the list in SML of New Jersey without using function head and tail, something like that:
I wrote a function which works as expected but i don\'t unde开发者_开发百科rstand why the output is like that.
hello everyone I\'m trying to write function which can unfold int in the list from any depth, for example if I have following bigList: [12, [34], [11,[1]]] I want to receive
I have this bit of code: fun foldr2(f, x::xs) = if xs = [] then x else f(x, foldr2(f, xs)) With the type signature
I need to write some function using ML, this function receives the list of the edges of the directed graph [(1,2),(1,3),(3,2)], it means directed edge from 1 to 2 and from 1 to 3..., and I receive als
hello everyone I have this snippet of the code: local helper(f, i, j) = local fun NTimesF(f, n:int) = if n = 1 then fn (x) => f(x)
hello everyone I have this snippet of the code: local fun NTimesF(f, n:int) = if n = 1 then fn (x) => f(x)
I need to write some function NTimesComposition(f:(int * int -> int), n:int) which receives some function f and integer n and after doing composition of f, n times, like this f(x,(f(x,f(x,y)))) <-
I am using Emacs with SML mode. Sometimes I need to clean the SML buffer. How can I do t开发者_JS百科hat.Standard ML of New Jersey is a functional programming language that is a variant of ML. Usually