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
// If foo is true, then we do all this stuff | |
if (foo) { | |
// Do foo stuff | |
} | |
// This is the stuff that happens in the else case | |
// but now I'm going to keep writing | |
// and eventually this else will move further | |
// and further down the page | |
// and at somepoint, it wont seem logically connected | |
// to the if at all. |
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
import math | |
def rotate(array, steps): | |
steps = steps % len(array) | |
reverse(array, 0, len(array) - 1) | |
reverse(array, 0, steps - 1) | |
reverse(array, steps, len(array) - 1) | |
return array | |
def reverse(array, start=0, end=None): |
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
module Main where | |
import Network.HTTP | |
import Text.JSON | |
import System.Environment | |
get :: String -> IO String | |
get url = do simpleHTTP (getRequest url) >>= getResponseBody | |
main :: IO () |