Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- fun {Countsingle L1#Lsub}
- if Lsub == nil then true
- elseif L1 == nil then false
- elseif L1.1 == Lsub.1 then {Countsingle L1.2#Lsub.2}
- else false
- end
- end
- declare
- fun {Countsub L1#Lsub}
- if L1 == nil then 0
- elseif {Countsingle L1#sub} then {Countsub L1#Lsub.2} + 1
- else {Countsub L1#Lsub.2}
- end
- end
Add Comment
Please, Sign In to add comment