Skip to content

Commit

Permalink
drop memoization
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanlas committed Jul 23, 2024
1 parent a5cd232 commit ca14958
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ package object spawningpool {

implicit def countToInt(count: PositiveCount): Int = count.count

def memoize[A, B](f: A => B): A => B = {
val cache = collection.mutable.Map[A, B]()

{ key =>
if (!cache.contains(key))
cache(key) = f(key)

cache(key)
}
}

implicit val asdf: Mutation[Int] = IntMutation

implicit class MutationOps[A: Mutation](x: A) {
Expand Down

This file was deleted.

0 comments on commit ca14958

Please sign in to comment.