Skip to content

Commit

Permalink
A3 8
Browse files Browse the repository at this point in the history
  • Loading branch information
roca committed Feb 10, 2013
1 parent f532636 commit 9968dee
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hw3provided.sml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ end

(* 9 *)
fun count_wildcards p =
let
val couunt_function = fn (x) => Wildcard ;
let fun counter(x , acc) =
case x of
[] => acc
| head::tail => counter(tail, 1 + acc)

in
g couunt_function (fn (x) => 1) p
end
g counter (fn (x) => String.size x) p
end

0 comments on commit 9968dee

Please sign in to comment.