Monthly Archives: November 2012

Java : A Parser modelling!

This need to implemented further. Advertisements

Posted in Design, Java | Leave a comment

Haskell decorators

Simple and elegant as always : ( just a composition at end ) but yeah decorator to be precise by type definition type Decoratorf a = a->a decorate:: (Decoratorf a )->(Decoratorf a )-> (Decoratorf a) decorate f g = f.g … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Java Predicates using lifters

Lifters is a technique where we use functions in different context : Below is lifters in Java creating predicates :

Posted in Uncategorized | Leave a comment

Haskell Predicates Using lifters

joy of lifters in haskell : code below create predicate for Person data, later used in filtering : data Person = Person {weight::Double,height::Double} deriving Show data PersonP’ a = PersonP’ {unconP::Person -> a} getWeight = PersonP’ (\(Person x y)-> x) … Continue reading

Posted in Uncategorized | Leave a comment