Never use Scala. Not even then.
If you see someone using Scala, take educational measures, not punitive. Help them be better.
[ | |
[ | |
{ | |
"a": 7 | |
}, | |
"", | |
"", | |
"", | |
"", | |
"", |
[ | |
[ | |
"~\n`", | |
"!\n1", | |
"@\n2", | |
"#\n3", | |
"$\n4", | |
"%\n5", | |
"^\n6", | |
"&\n7", |
[ | |
[ | |
"Esc", | |
"F1", | |
"F2", | |
"F3", | |
"F4", | |
"F5", | |
"F6", | |
"F7", |
[ | |
[ | |
{ | |
"a": 7 | |
}, | |
"", | |
"", | |
"", | |
"", | |
"", |
package rxExample; | |
import io.reactivex.Observable; | |
import io.reactivex.schedulers.TestScheduler; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; |
A type constructor F[_]
together with an operation forall A, B. (A => B) => F[A] => F[B]
that satisfies FunctorLaw,
i.e. that a series of maps may be freely rewritten as a single map on a composed function, and that the identity function, lifted, is a no-op.
A good example from scalaz
def map[A, B](fa: F[A])(f: (A) ⇒ B): F[B]
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
#!/bin/sh | |
#.git/hooks/prepare-commit-msg | |
original="$1" | |
temp=`mktemp /tmp/git-XXXXX` | |
ticket=`git branch | grep '^\*' |sed -e 's@.*/@@'` | |
(printf "\n\n$ticket"; cat "$original") > "$temp" | |
cat "$temp" > "$original" |