sml
ml datatype (with primitive functions) how to make?
i have this datatype datatype e = X | Const of int | P 开发者_StackOverflow中文版of e*e | S of e*e | M of e*e | D of e*e;[详细]
2023-03-09 13:24 分类:问答Standard ML: Naming datatypes of function arguments possible?
I\'m new to ML and with to have a function that receives a special pre-defined datatype, and able to reference to its entire argument datatype, rather its components.[详细]
2023-03-09 11:07 分类:问答infinite sequence in SML
I have to code a function that receives a sequence (finite or infinite) and returns an identical sequencewith the only difference that if an exception occurs during the sequence then the function ret[详细]
2023-03-07 11:51 分类:问答Well founded induction on trees
I have an exam (Functional Programming in SML) coming up in a week. I have become fairly confident in the programming language SML and the functional paradigm, but I have a quite big problem with prov[详细]
2023-03-06 20:37 分类:问答In SML, how to assert that a particular exception is thrown?
Without taking the effort to actually clone JUnit or something, I\'m throwing together a few utility functions to help test some SML code.I do know about QCheck, but it can\'t do this one thing either[详细]
2023-03-05 08:22 分类:问答Confusing type declaration?
I haven\'t worked with SML in awhile and I came across this line of code: type memory = string -> int;[详细]
2023-03-05 02:46 分类:问答How to do an addition on a list with a condition?
I have a university course about functional programming, where I use SML. As a preparation for the exam, I am working on some of the older exam sets without solutions.[详细]
2023-03-04 06:50 分类:问答Garbage collection in SML, Java, C, Pascal
Why is garbage col开发者_开发知识库lection rarely spoken about in languages such as Pascal and C, whereas it is very important in SML and Java?Pascal and C don\'t traditionally use garbage collections[详细]
2023-03-02 21:48 分类:问答What are the primary theoretical difficulties with adding ML-style modules to Haskell?
It is well known that Haskell-style typeclasses and ML-style modules offer different mechanisms for specifying interfaces. They are (possibly) equivalent in power, but in practice each has their own b[详细]
2023-02-26 15:26 分类:问答How do I access a random member of a Tuple?
I would like to access a random member of a tuple and I\'m not sure how to set #n to a variable. Here is my code:[详细]
2023-02-25 05:34 分类:问答