This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Inspired by http://nedbatchelder.com/blog/201301/stupid_languages.html | |
| -- which describes how the Javascript array.map function seems weird | |
| -- and also http://blog.sigfpe.com/2008/03/comonadic-arrays.html | |
| -- which describes the comonad for arrays | |
| import Data.Array | |
| import Data.Char | |
| class Functor w => Comonad w where | |
| (=>>) :: w a -> (w a -> b) -> w b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Referentially transparent program to print the size of files. | |
| * | |
| * Techniques inspired by: | |
| * "Dead-Simple Dependency Injection" | |
| * Rúnar Óli Bjarnason | |
| * Northeast Scala Symposium, 2012 | |
| * | |
| * To run: "scala filesizerer.scala" | |
| * When prompted, enter a file name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| externalResolvers <<= resolvers map { rs => | |
| Resolver.withDefaultResolvers(rs, scalaTools = false) | |
| } |
NewerOlder