Guest User

Untitled

a guest
Jan 14th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Oz 0.35 KB | None | 0 0
  1. declare
  2. fun {Countsingle L1#Lsub}
  3.   if Lsub == nil then true
  4.   elseif L1 == nil then false
  5.   elseif L1.1 == Lsub.1 then {Countsingle L1.2#Lsub.2}
  6.   else false
  7.   end
  8. end
  9.  
  10. declare
  11. fun {Countsub L1#Lsub}
  12.   if L1 == nil then 0
  13.   elseif {Countsingle L1#sub} then {Countsub L1#Lsub.2} + 1
  14.   else {Countsub L1#Lsub.2}
  15.   end
  16. end
Add Comment
Please, Sign In to add comment