smlnj
Can I expand a typedef in SMLNJ?
So I was writing up some code in standard ML, and trying to compile it with smlnj. I got the following error:[详细]
2023-02-11 11:32 分类:问答mechanism to get element from the list
is it possible to g开发者_如何学编程et element from the list in SML of New Jersey without using function head and tail, something like that:[详细]
2023-02-04 07:47 分类:问答Output is truncated with #-signs in the REPL
I wrote a function which works as expected but i don\'t unde开发者_开发百科rstand why the output is like that.[详细]
2023-02-01 18:44 分类:问答unfolding lists in ML
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[详细]
2023-01-31 05:59 分类:问答SML list equality oddness
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[详细]
2023-01-31 04:10 分类:问答graph in SML of NJ
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[详细]
2023-01-27 15:50 分类:问答nested local declarations in ML of NJ
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)[详细]
2023-01-27 02:19 分类:问答error in the SML of NJ
hello everyone I have this snippet of the code: local fun NTimesF(f, n:int) = if n = 1 then fn (x) => f(x)[详细]
2023-01-27 02:16 分类:问答composition of the functions
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)))) <-[详细]
2023-01-26 15:39 分类:问答How to clear SML Buffer in Emacs when using SML mode.
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[详细]
2023-01-26 13:41 分类:问答