From Bas van Dijk:
To understand these things I would recommend using nix-repl:
$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
| module SelectMenu exposing (..) | |
| import Element exposing (..) | |
| import Element.Input as Input | |
| import Element.Font as Font | |
| import Dom | |
| import Color exposing (..) | |
| morgan.token('remote-addr', function (req, res) { | |
| var ffHeaderValue = req.headers['x-forwarded-for']; | |
| return ffHeaderValue || req.connection.remoteAddress; | |
| }); |
| -- | simple/basic Scala -> Haskell translation of Runar's presentation | |
| -- | (https://dl.dropboxusercontent.com/u/4588997/ReasonablyPriced.pdf) | |
| -- | trying to use minimal extensions and magic. | |
| -- | (earlier I had a version using MultiParamTypeClasses for Runar's | |
| -- | Inject class, but scraped it opting for simplicity) | |
| -- | my question: what do we lose by moving towards simplicity? | |
| -- | Future work: use DataKinds, TypeOperators, and potentially TypeFamilies | |
| -- | to maintain and automate the folding of types in Coproduct. | |
| {-# LANGUAGE Rank2Types, DeriveFunctor #-} |
| sealed trait Interact[A] | |
| case class Ask(prompt: String) | |
| extends Interact[String] | |
| case class Tell(msg: String) | |
| extends Interact[Unit] | |
| trait Monad[M[_]] { | |
| def pure[A](a: A): M[A] |
| <?php | |
| function hook_js_alter(&$js){ | |
| uasort($js, 'drupal_sort_css_js'); | |
| $i = 0; | |
| foreach($js as $name => $script) { | |
| $js[$name]['weight'] = $i++; | |
| $js[$name]['group'] = JS_DEFAULT; | |
| $js[$name]['every_page'] = FALSE; | |
| $js[$name]['scope'] = 'footer'; |