954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

syntax mistakes in SML

Please help me out with syntax mistakes

fun rappend(L1,L2)
    if null L2 then L1
    else rappend(tl(L2) @ L1, hd(L2))
lotrsimp12345
Posting Pro in Training
413 posts since Jun 2009
Reputation Points: 47
Solved Threads: 2
 

figured it out. Stupid syntax :(.

Here's the answer

rappend(L1,L2)
    if null L2 then L1
    else rappend(tl(L2)@L1,[hd(L2)])
lotrsimp12345
Posting Pro in Training
413 posts since Jun 2009
Reputation Points: 47
Solved Threads: 2
 

darn I can't seem to figure out how to do reverse append.

lotrsimp12345
Posting Pro in Training
413 posts since Jun 2009
Reputation Points: 47
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You