Category "sml"

SML Convert integer to list

The below code is able to successfully convert an integer file to a list however i need to convert an integer to a list such as. Can anyone assist please ? read

How to bind socket to localhost in Standard ML

How do I bind an inet socket to localhost (127.0.0.1) in Standard ML? I came up with Socket.bind (socket, INetSock.toAddr (valOf (NetHostDB.fromString "127.0.0.

Dfs to find visited nodes in sml

What is wrong with this part of code ? I'm trying to make a function which (given a graph) returns a list with all visited nodes, but the compiler keeps saying

foldl function in SML/NJ: Right-hand-side of clause doesn't agree with function result type

I have a function named dfs which produces a list of all visited nodes in a graph represented by a list of tuples such as [(node1,node2,weight),....] and I get