concatenation - SML, Write a function that concatenates a list of lists -


i need write concat function in standardml such that:

concat [[5,4,3],[],[9,5],[],[],[1,1]] = [5,4,3,9,5,1,1] 

i new @ sml, don't think understand how breakdown lists , append them. answer may use built in append function

alist @ blist  

thanks!

if you're expected write such function, i'm assuming have learned how build recursive functions iterate through list. knowledge plus @ function should enough.

if you're unsure list method use, lista @ listb creates new list combination of lista , listb, while item1 :: lista creates new list item1 added head of lista.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -