Functional programming
14.7K views | +0 today
Functional programming
Functional programming
Your new post is loading...
Your new post is loading...
Scooped by Srdjan Strbanovic
April 25, 2014 4:31 PM
Scoop.it!

What I Wish I Knew When Learning Haskell ( Stephen Diehl )

What I Wish I Knew When Learning Haskell ( Stephen Diehl ) | Functional programming | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
April 25, 2014 12:14 PM
Scoop.it!

DynamoDB.SQL from F# by theburningmonk

DynamoDB.SQL from F# by theburningmonk | Functional programming | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 4:16 PM
Scoop.it!

Scala: Types of a higher kind - Atlassian Blogs

Scala: Types of a higher kind - Atlassian Blogs | Functional programming | Scoop.it
One of the more powerful features Scala has is the ability to generically abstract across things that take type parameters. This feature is known as Higher Kinded Types (HKT). This feature allows us to write a library that works with a much wider array of classes, whereas without the feature you are condemned to bespoke and error ridden code duplication for each class that may want the functionality. Type constructors Essentially what HKT gives us is the ability to generalize across type constructors – where a type constructor is anything that has a type parameter. For instance List[_]* is not a type, the underscore is a hole into which another type may be plugged, constructing a complete type. List[String] and List[Int] being examples of complete (or distinct) types. Kinds Now that we have a type constructor we can think of several different kinds of them, classified by how many type parameters they take. The simplest – like List[_] – that take a single param have the kind: (* -> *) This says: given one type, produce another. For instance, given String produce the type List[String]. Something that takes two parameters, say Map[_, _], or Function1[_, _] has the kind: (* -> * -> *) This says: given one type, then another, produce the final type. For instance given the key type Int and the value type String produce the type Map[Int, String]. Furthermore, you can have kinds that are themselves parameterized by higher kinded types. So, something could not only take a type, but take something that itself takes type parameters. An example would be the covariant functor: Functor[F[_]], it has the kind: ((* -> *) -> *) This says: given a simple higher kinded type, produce the final type. For instance given a type constructor like List produce the final type Functor[List]. Utility Say we have some standard pattern for our data-structures where we want to be able to consistently apply an operation of the same shape. Functors are a nice example, the covariant functor allows us to take a box holding things of type A, and a function of A => B and get back a box holding things of type B. In Java, there is no way to specify that these things share a common interface, or that we simply want transformable boxes. We need to either make this static eg. Guava’s Lists and Iterables, or bespoke on the interface, eg: fugue’s Option or atlassian-util-concurrent’s Promise. There is simply no way to unify these methods on either some super interface or to specify that you have – or require – a “mappable/transformable” box. With HKT I can represent the covariant functor described above as: 1234567891011121314151617181920212223242526272829303132333435trait Functor[F[_]] {   def map[A, B](fa: F[A])(f: A => B): F[B] }   // implement for java's List // note that the presence of mutation in the Java collections // breaks the Functor laws import java.util.{ List => JList } implicit object JavaListFunctor extends Functor[JList] {   import collection.JavaConverters._     def […]
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 3:29 PM
Scoop.it!

Simple Parallel Array Filtering in F#

Simple Parallel Array Filtering in F# | Functional programming | Scoop.it
Recently I was doing some data processing and since it fit nicely in a parallel setup, I changed my pipeline to use the Array.Parallel module. An easy and simple change that can speed up your task ...
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 9:41 AM
Scoop.it!

nessos/Vagrant

nessos/Vagrant | Functional programming | Scoop.it
Vagrant - A library for distributing dynamic assemblies
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 9:30 AM
Scoop.it!

wreq: a Haskell web client library

No comment yet.
Scooped by Srdjan Strbanovic
April 23, 2014 8:55 AM
Scoop.it!

F# scripting for a component based game engine

No comment yet.
Scooped by Srdjan Strbanovic
April 22, 2014 9:41 AM
Scoop.it!

Include Brain - Another Porter Stemmer in F#

No comment yet.
Scooped by Srdjan Strbanovic
April 11, 2014 11:25 AM
Scoop.it!

Abstracting over 'M' | F# Snippets

A higher kind of request to Don Syme... please please please,,,, we desperately need higher kinds!
No comment yet.
Scooped by Srdjan Strbanovic
April 10, 2014 4:33 PM
Scoop.it!

Brian Beckman: Don't fear the Monad (Channel 9)

Brian Beckman: Don't fear the Monad (Channel 9) | Functional programming | Scoop.it
Functional programming is increasing in popularity these days given the inherent problems with shared mutable state that is rife in the imperative world. As we march on to a world of multi and many-co
No comment yet.
Scooped by Srdjan Strbanovic
April 10, 2014 10:17 AM
Scoop.it!

1A: Overview and Introduction to Lisp | Video Lectures

1A: Overview and Introduction to Lisp | Video Lectures | Functional programming | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
April 9, 2014 6:20 PM
Scoop.it!

example of why to use monads - what they can do - Haskell | FP Complete

No comment yet.
Scooped by Srdjan Strbanovic
April 25, 2014 1:24 PM
Scoop.it!

Functional reactive programming - Wikipedia, the free encyclopedia

Functional reactive programming - Wikipedia, the free encyclopedia

Functional reactive programming ( FRP) is a programming paradigm for reactive programming using the building blocks of functional programming. FRP has been used for programming GUIs, robotics, and music, aiming to simplify these problems by explicitly modeling time.

No comment yet.
Scooped by Srdjan Strbanovic
April 25, 2014 12:50 PM
Scoop.it!

VesaKarvonen/Hopac

VesaKarvonen/Hopac | Functional programming | Scoop.it
Inspired by languages like Concurrent ML and Cilk, Hopac is a library for F# with the aim of making it easier to write correct, modular and efficient parallel, asynchronous and concurrent programs.
No comment yet.
Scooped by Srdjan Strbanovic
April 25, 2014 11:26 AM
Scoop.it!

The First Monad Tutorial by Phillip Wadler - YOW! 2013 | Eventer

The First Monad Tutorial by Phillip Wadler - YOW! 2013 | Eventer | Functional programming | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 3:31 PM
Scoop.it!

Digital Signal Processing #1

Digital Signal Processing #1 | Functional programming | Scoop.it
The following example uses sequence and array operators to implement a simple digital filter. The example builds on the previous WAV I/O example. A digital filter frequently needs multiply-add oper...
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 9:43 AM
Scoop.it!

pocketberserker/FsAttoparsec

pocketberserker/FsAttoparsec | Functional programming | Scoop.it
FsAttoparsec - A port of Bryan O'Sullivan's attoparsec from Haskell to F#
No comment yet.
Scooped by Srdjan Strbanovic
April 24, 2014 9:39 AM
Scoop.it!

eulerfx/HyperF

eulerfx/HyperF | Functional programming | Scoop.it
HyperF - F# async service framework
No comment yet.
Scooped by Srdjan Strbanovic
April 23, 2014 9:18 AM
Scoop.it!

Running canopy tests with FAKE

Running canopy tests with FAKE | Functional programming | Scoop.it
FAKE - F# Make
No comment yet.
Scooped by Srdjan Strbanovic
April 22, 2014 9:43 AM
Scoop.it!

mountebank mocks with F#

No comment yet.
Scooped by Srdjan Strbanovic
April 22, 2014 9:25 AM
Scoop.it!

Writing a MiniC-to-MSIL compiler in F# - Part 1 - Defining the abstract syntax tree

Writing a MiniC-to-MSIL compiler in F# - Part 1 - Defining the abstract syntax tree | Functional programming | Scoop.it
Blog and open source projects by Tim Jones.
No comment yet.
Scooped by Srdjan Strbanovic
April 11, 2014 11:23 AM
Scoop.it!

Session Types in F# | F# Snippets

An implementation of session types in F#. Inspired from the paper "Haskell Session Types with (Almost) No Class"
No comment yet.
Scooped by Srdjan Strbanovic
April 10, 2014 4:33 PM
Scoop.it!

A Fistful of Monads - Learn You a Haskell for Great Good!

A Fistful of Monads - Learn You a Haskell for Great Good! | Functional programming | Scoop.it
No comment yet.
Scooped by Srdjan Strbanovic
April 9, 2014 6:34 PM
Scoop.it!

concrete monads 1 : Maybe, Either, list, IO

No comment yet.