Scala funsets initial implementation.

Pending more tests.