Skip to content

Instantly share code, notes, and snippets.

View LucianU's full-sized avatar

Lucian Ursu LucianU

View GitHub Profile
fromIndex :: Int -> [a] -> Maybe a
fromIndex 0 (x:xs) =
Just x
fromIndex index [] =
Nothing
fromIndex index (x:xs) =
fromIndex (index - 1) xs
newtype Identity a =
Identity { runIdentity :: a }
deriving (Eq, Show)
newtype Compose f g a =
Compose { getCompose :: f (g a) }
deriving (Eq, Show)
instance (Functor f, Functor g) =>
Functor (Compose f g) where
@LucianU
LucianU / config_application.rb
Created January 23, 2017 09:54
Rails app debug
require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Voluntari
class Application < Rails::Application