Skip to content

Instantly share code, notes, and snippets.

View migimunz's full-sized avatar

Nemanja Stojanovic migimunz

View GitHub Profile
### Redirects controller:
class RedirectsController < ApplicationController
def create
redirect_to "http://www.google.com"
end
end
### Routes
@migimunz
migimunz / example1.hs
Created February 19, 2018 21:22
CS162 - haskell examples
import Prelude hiding (foldl)
data Moody a = Happy a | Depressed a
deriving Show
foo (Happy a) = Happy (a + 1)
foo (Depressed a) = Depressed (a - 1)
foldl :: (b -> a -> b) -> b -> [a] -> b