tagged [functional-programming]
C# - IEnumerable to delimited string
C# - IEnumerable to delimited string What is the functional programming approach to convert an `IEnumerable` to a delimited string? I know I can use a loop, but I'm trying to wrap my head around funct...
- Modified
- 23 Dec at 17:12
Does JavaScript have a method like "range()" to generate a range within the supplied bounds?
Does JavaScript have a method like "range()" to generate a range within the supplied bounds? In PHP, you can do... That is, there is a function that lets you get a range of numbers or characters by pa...
- Modified
- 1 Dec at 18:5
Use attributes for value tuples
Use attributes for value tuples In C# 7.0, .NET introduces a new return value tuple types (functional programming), so instead of: I'd like to use value tuples: And I want to use attributes for these ...
- Modified
- 13 Feb at 07:56
Function point to kloc ratio as a software metric... the "Name That Tune" metric?
Function point to kloc ratio as a software metric... the "Name That Tune" metric? What do you think of using a metric of function point to lines of code as a metric? It makes me think of the old game ...
- Modified
- 28 Oct at 17:48
When to use closure?
When to use closure? I have seen samples of closure from - [What is a 'Closure'?](https://stackoverflow.com/questions/36636/what-is-a-closure) Can anyone provide simple example of when to use closure?...
- Modified
- 23 May at 11:46
List of strings to one string
List of strings to one string Lets say you have a: In this crazy functional world we live in these days which one of these would be best for creating one string by concatenating these: ``` String.Join...
- Modified
- 25 Nov at 20:38
What is difference between functional and imperative programming languages?
What is difference between functional and imperative programming languages? Most of the mainstream languages, including object-oriented programming (OOP) languages such as C#, Visual Basic, C++, and J...
- Modified
- 22 Aug at 12:37
C# operators as functions
C# operators as functions Is there a way to use operators as functions without declaring them manually? Similar to `(+)`/`(-)` in Haskell. Would be handy in various LINQ scenarios involving conditiona...
- Modified
- 16 Dec at 23:25
How safe would it be to use functional-java to add closures to a Java production project?
How safe would it be to use functional-java to add closures to a Java production project? I would love to use closures in Java. I have read that they may or may not make it into Java 7. But an open-so...
- Modified
- 20 Apr at 03:23
How would you implement LINQ methods with SelectMany?
How would you implement LINQ methods with SelectMany? > Erik Meijer is fond of pointing out that every LINQ function could actually be implemented by SelectMany; everything else is just a convenience....
- Modified
- 23 May at 10:31
Can Nullable be used as a functor in C#?
Can Nullable be used as a functor in C#? Consider the following code in C#. The last line will return a compilation error `cannot convert from 'int?' to 'int'` which is fair enough. However, for examp...
- Modified
- 28 Jan at 20:16
Examples of useful or non-trival dual interfaces
Examples of useful or non-trival dual interfaces Recently Erik Meijer and others have show how `IObservable/IObserver` is the [dual](http://en.wikipedia.org/wiki/Dual_(category_theory)) of `IEnumerabl...
- Modified
- 11 Feb at 10:30
Wrapping my head around OCaml
Wrapping my head around OCaml I'm only a novice programmer (I do it for fun) and I'm coming from the world of Python/C++/other procedural languages, and procedural style of problem solving. I fell in ...
- Modified
- 14 Apr at 14:10
Converting Func<> types
Converting Func types Trying to cast f2 to f1: Tried map function to solve but, this time i get exception. on tranform(a) function ``` Func
- Modified
- 30 Jan at 08:40
What are the kinds of covariance in C#? (Or, covariance: by example)
What are the kinds of covariance in C#? (Or, covariance: by example) Covariance is (roughly) the ability to of "simple" types in complex types that use them. E.g. We can always treat an instance of `C...
- Modified
- 22 Jul at 13:34
Removing elements with Array.map in JavaScript
Removing elements with Array.map in JavaScript I would like to filter an array of items by using the `map()` function. Here is a code snippet: The problem is that filtered out items still uses space i...
- Modified
- 22 Dec at 06:3
What is the difference between Scala's case class and class?
What is the difference between Scala's case class and class? I searched in Google to find the differences between a `case class` and a `class`. Everyone mentions that when you want to do pattern match...
- Modified
- 23 Sep at 17:47
How to use underscore.js as a template engine?
How to use underscore.js as a template engine? I'm trying to learn about new usages of javascript as a serverside language and as a functional language. Few days ago I heard about node.js and express ...
- Modified
- 20 Jun at 09:12
Is there a way to make this slideshow move automatically?
Is there a way to make this slideshow move automatically? This is the slideshow that we used: [http://www.littlewebthings.com/projects/blinds/](http://www.littlewebthings.com/projects/blinds/) and thi...
- Modified
- 25 Nov at 08:19
What are the advantages of built-in immutability of F# over C#?
What are the advantages of built-in immutability of F# over C#? 1. I heard F# has native support for immutability but what about it that can not be replicated in C#? What do you get by an F# immutable...
- Modified
- 3 Feb at 18:4
How much is there to LINQ?
How much is there to LINQ? I'm looking into LINQ and the query language appears (at least on the surface) to be nothing more than an implementation of map and/or list comprehensions as found in Haskel...
- Modified
- 13 Sep at 17:0
In what areas does F# make "absolute no sense in using"?
In what areas does F# make "absolute no sense in using"? Don Syme in his SPLASH talk says that F# is NOT intended to be a replacement for C# even though it has the general capabilities. He goes on to ...
- Modified
- 20 Jun at 09:12
How do I use the includes method in lodash to check if an object is in the collection?
How do I use the includes method in lodash to check if an object is in the collection? lodash lets me check for membership of basic data types with `includes`: But the following doesn't work: This con...
- Modified
- 11 Feb at 17:2
Generic Map/Reduce List Extensions in C#
Generic Map/Reduce List Extensions in C# I am writing a few extensions to mimic the map and reduce functions in Lisp. ``` public delegate R ReduceFunction(T t, R previous); public delegate void Transf...
- Modified
- 26 Feb at 19:6
What is a catamorphism and can it be implemented in C# 3.0?
What is a catamorphism and can it be implemented in C# 3.0? I'm trying to learn about catamorphisms and I've read [the Wikipedia article](http://en.wikipedia.org/wiki/Catamorphism) and the first coupl...
- Modified
- 15 Sep at 17:3