Advertisement
Guest User

Untitled

a guest
May 26th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. NewElement = rebuild(List),
  2. NEWLIST = [NewElement, X, Y].
  3.  
  4. rebuildlist(List) ->
  5. case is_list(hd(List)) of
  6.  
  7. true -> tl(List);
  8.  
  9. false -> ????
  10.  
  11. end.
  12.  
  13.  
  14. if I have a list like this [[4,5],[6,8,0]] then it evaluates true and I get the tail
  15. if I have a list like [5,6,7,8,9,9] then it evaluates false, I dont need anything from this list.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement