Fork me on GitHub
#beginners
<
2015-08-27
>
rishat19:08:56

Guys, could somebody explain how memoize works? Does it wrap a function around a function and a map and store calculated values in the map?

rishat19:08:07

Or is its behavior more complex?

nikp19:08:36

In essence, it stores computed values in an atom. Any time you call the function with the same arguments, the computed value from the atom is returned. If there are new arguments, then the fn is applied to the arguments, the value stored and returned

rishat19:08:35

Atom for the purpose of statefulness, right?

nikp19:08:15

Yup, that's correct. That is how the computed value is stored in memory, via an atom

rishat19:08:26

surely should have took a look into source code, thanks a lot!

nikp19:08:43

No problem simple_smile

audaxion21:08:42

anyone have experience running a luminusweb template in cursive with the sassc plugin? i keep getting an error that sassc can’t be found, even though when i run lein repl from the command line it works fine. OS 10.11