Skip to content

Instantly share code, notes, and snippets.

View ajnsit's full-sized avatar
🚕
Places to go, things to do

Anupam <|> अनुपम ajnsit

🚕
Places to go, things to do
View GitHub Profile
module Main where
import Prelude
import Concur.Core (Widget)
import Concur.Core.FRP (Signal, debounce, display, dyn)
import Concur.React (HTML)
import Concur.React.DOM as D
import Concur.React.Props as P
import Data.Foldable (class Foldable, fold)
@ajnsit
ajnsit / ConcurHorizon.md
Last active May 12, 2019 20:19
Things on the horizon for Concur

Things on the horizon for Concur (In no particular order)

  1. UI Components
  2. 7GUIs
  3. Realworld Concur
  4. Formless
  5. Select
  6. Hyper
  7. Benchmark
  8. Bootstrap
@ajnsit
ajnsit / SyntacticTricksPurescript.md
Last active March 26, 2019 08:54
Syntactic Tricks for Purescript

Some Small Syntactic Tricks for Purescript

Pointfree

-- Given a simple 2 arg function
minus :: Int -> Int -> Int
minus x y = x - y

-- We can easily paramterise on the second argument
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
@ajnsit
ajnsit / HaskellWorkshop.hs
Last active May 12, 2018 18:07
Some code from the absolute beginner's Haskell workshop @ May 2018 ILUGD meetup
-- First steps -
-- Install Stack tool - haskellstack.org
-- Then do - stack setup, and stack ghci.
-- Haskell language basics - I
-- Conceptually functions are values, values are (no-arg) functions
-- The following can be considered a function with no arguments
alwaysOne = 1
@ajnsit
ajnsit / log
Created May 5, 2018 10:04
Trying to get started with Haskell and Nix
λ git clone https://github.com/data61/fp-course.git
Cloning into 'fp-course'...
remote: Counting objects: 7646, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 7646 (delta 17), reused 22 (delta 12), pack-reused 7614
Receiving objects: 100% (7646/7646), 3.67 MiB | 257.00 KiB/s, done.
Resolving deltas: 100% (4096/4096), done.
λ cd fp-course
@ajnsit
ajnsit / Transient.cont.hs
Created September 28, 2017 12:38 — forked from agocorona/Transient.cont.hs
Optimized, simplified continuation monad that implement all the Transient effects (except logging and distributed computing), with mockup implementation of some of them (https://github.com/transient-haskell/transient)
{-# LANGUAGE MultiParamTypeClasses, ExistentialQuantification, ScopedTypeVariables, FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
import Control.Applicative
import Control.Monad.IO.Class
import Control.Monad.Trans
import GHC.Conc
import System.IO.Unsafe
import Data.IORef
import Control.Concurrent.MVar
import qualified Data.Map as M
import Data.Typeable
@ajnsit
ajnsit / Main.hs
Created May 3, 2017 18:53 — forked from lexi-lambda/Main.hs
Minimal Haskell implementation of Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Language.HigherRank.Main
( Expr(..)
, EVar(..)
, Type(..)
, TVar(..)
, TEVar(..)
, runInfer
) where
@ajnsit
ajnsit / RequestMonad.hs
Created January 5, 2017 05:50
Request Monad Transformer, allows suspending any monadic computation
{-# LANGUAGE ExistentialQuantification, DeriveFunctor, StandaloneDeriving, TupleSections #-}
module Request where
import Data.Maybe (fromMaybe)
import Control.Monad (ap, liftM)
import Control.Monad.Trans.Class (MonadTrans, lift)
import Control.Applicative (Alternative(..))

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x