One can set adhoc Ivy home for SBT as:
# Using example directory in tmp
$ sbt -ivy /tmp/.ivy2
# Another option
$ sbt -Dsbt.ivy.home=/tmp/.ivy2/
| // by dave | |
| float[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| p = c01(p); | |
| return 3*p*p - 2*p*p*p; | |
| } | |
| float ease(float p, float g) { |
| float[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| p = c01(p); | |
| return 3*p*p - 2*p*p*p; | |
| } | |
| float ease(float p, float g) { | |
| p = c01(p); |
| /* | |
| Modified from the original https://gist.github.com/louthy/524fbe8965d3a2aae1b576cdd8e971e4 | |
| - removed dependency on [language-ext](https://github.com/louthy/language-ext) | |
| - separated monadic boilerplate, so you may concentrate on describing the operations and interpretation of the program | |
| - removed `IO<A>.Faulted` to simplify the examples. It can be added back in straightforward manner. | |
| Useful links: | |
| - [John DeGoes: Beyond Free Monads - λC Winter Retreat 2017](https://www.youtube.com/watch?v=A-lmrvsUi2Y) | |
| - [Free and tagless compared - how not to commit to a monad too early](https://softwaremill.com/free-tagless-compared-how-not-to-commit-to-monad-too-early) |
| // | |
| // See https://github.com/louthy/language-ext | |
| // | |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using LanguageExt; | |
| using static LanguageExt.Prelude; |
| using System; | |
| namespace PureIO { | |
| /* | |
| C# does not have proper sum types. They must be emulated. | |
| This data type is one of 4 possible values: | |
| - WriteOut, being a pair of a string and A | |
| - WriteErr, being a pair of a string and A | |
| - readLine, being a function from string to A |