Skip to content

Instantly share code, notes, and snippets.

View callerobertsson's full-sized avatar
Converting coffee to code

Calle Robertsson callerobertsson

Converting coffee to code
View GitHub Profile
@callerobertsson
callerobertsson / fibonacci.hs
Last active November 22, 2017 17:00
Haskell: Fibonacci Big Number
module Main where
main = do
print $ map fibN' [1..10]
print $ fibN' 1001
print $ length $ show $ fibN' 500000
fibN' 1 = 0
fibN' 2 = 1
fibN' n = iter 0 1 n where
@callerobertsson
callerobertsson / fibonacci.go
Last active January 14, 2022 15:49
Golang: Fibonacci Big Number
package main
import (
"fmt"
"math/big"
)
func main() {
for i := 1; i <= 10; i++ {
@callerobertsson
callerobertsson / gopastebin.go
Last active August 29, 2015 14:27
Golang: Command line wrapper for posting to pastebin.com
package main
import (
"flag"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"strconv"