This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################### | |
# To use: | |
# https://raw.github.com/gist/2776351/??? | |
# chmod 777 install_postgresql.sh | |
# ./install_postgresql.sh | |
############################################### | |
echo "*****************************************" | |
echo " Installing PostgreSQL" | |
echo "*****************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MMethod[M, A1, A2, R](f: (A1, A2) => R) { | |
def apply(a1: A1, a2: A2): R = f(a1, a2) | |
} | |
class MultiMethod { | |
def apply[A1, A2, R](a1: A1, a2: A2) | |
(implicit mm: MMethod[this.type, A1, A2, R]): R = | |
mm(a1, a2) | |
// use a singleton type to attach the resulting implicit to our multimethod |