Posts Tagged ‘ function ’

HOFs, closures, partial application and currying to solve the function environment problem in Scala

November 16, 2015
By
HOFs, closures, partial application and currying to solve the function environment problem in Scala

Introduction Functional programming (FP) is a programming style that emphasises the use of referentially transparent pure functions and immutable data structures. Higher order functions (HOFs) tend to be used extensively to enable a clean functional programming style. A HOF is just a function that either takes a function as an argument or returns a function. … Continue reading HOFs, closures, partial application and currying to solve the function environment problem…

Read more »

Example 2015.1: Time to refinance?

January 5, 2015
By
Example 2015.1: Time to refinance?

In the US, it's typical to borrow a fairly substantial portion of the cost of a new house from a bank. The cost of these loans, the mortgage rate, varies over time depending on what the financial wizards see in their crystal balls. What this means ov...

Read more »

Hijacking R Functions: Changing Default Arguments

August 19, 2014
By
Hijacking R Functions: Changing Default Arguments

I am working on a package to collect common regular expressions into a canned collection that users can easily use without having to know regexes. The package, qdapRegex, has a bunch of functions in the form of rm_xxx. The only … Continue reading →

Read more »

Lexical scope and function closures in R

November 23, 2011
By
Lexical scope and function closures in R

Introduction R is different to many “easy to use” statistical software packages – it expects to be given commands at the R command prompt. This can be intimidating for new users, but is at the heart of its power. Most powerful software tools have an underlying scripting language. This is because scriptable tools are typically [...]

Read more »


Subscribe

Email:

  Subscribe