Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
have you tried to make the dunction a static one? ;)
It's immutable in both cases. You can use substitution for pure functions.
auto a = add(1)(2);
means thata
is and will forever be the same thing asadd(1)(2)
. You can substitute one with the other in any place.a == add(1)(2) == 3
,a(3) == add(1)(2)(3)
.a(3)
should be6
, buta
is still the value ofadd(1)(2)
and should be3
. It doesn't have any mutable state.