Hi All,
I am going to work on a Web Application which I have to start with Gathering the Business Requirements up on which I need to develop Functional and Technical Documents. I have not developed Functional and Technical design documents on my own, could you let me know how to start and what are the things I need to take in to conside...
Which are the uses for id function in Haskell?
...
Given an array containing other nested arrays, I want to create an array containing only the elements from the first array. For example [["1", "2"], "3", [["4"]]] should evaluate to ["1", "2", "3", "4"].
I've managed to make a method that works:
@@unwrapped_array = []
def unwrap_nested_array(array)
if array.respond_to?('each')
...
We're discussing oo-functional hybrids here, but I wonder, how many languages actually qualify for this name. Scala, Clojure, F#? Any more?
It'd be great to get one such language per answer, and a little explanation, why you think it is oo-functional hybrid.
...
I'm new to Scala and was just reading Scala By Example. In chapter 2, the author has 2 different versions of Quicksort.
One is imperative style:
def sort(xs: Array[Int]) {
def swap(i: Int, j: Int) {
val t = xs(i); xs(i) = xs(j); xs(j) = t
}
def sort1(l: Int, r: Int) {
val pivot = xs((l + r) / 2)
var ...
Im trying to solve Problem 11 of Project Euler in haskell. I almost did it, but right now im
stuck, i want to transform a Matrix represented as [String] to a Matrix represented as [[Int]].
I "drawed" the matrices:
What i want:
"08 02 22 97 38 15 00 40 [ ["08","02","22","97","38","15","00","40"], [[08,02...
Edit: I prefer this solution I found eventually in Google's cache (it has been deleted from the author's site) as it only needs one type specification and does it in a way I haven't seen before. I don't know why the original author deleted it.
// Desired call syntax:
nameTextBox.Bind(t => t.Text, aBindingSource, (Customer c) => c.FirstN...
What is the best way of comparing code complexity of functional language and imperative language?
In my case I have to compare complexity of certain programs written in F# and C++.
As for now as a code quality measure I am using lines of source code.
...
I was wondering: can infinite loops be done in functional programming?
example: when using the windows API to get windows messages, it is usually implemented in a loop.
I know it is possible to make a function that will keep going into recursion indefinitely. I expect that this will result in a stack overflow.
are infinite loop the...
I was asked this question in an interview.
What are functional and non functional parts of an application ?
...
Hi, when there is some list of advantages of functional languages, there is usually mentioned that it makes concurrency easier because there is not any variables which are subject of change. But, as my assembler-school-lessons-memory knows, there are registers in cpu and memory, that are both mutable. So when the high-level functional co...
I'm writing a python command line program which has some interdependent options, I would like for the user to be able to enter the options in whichever order they please.
Currently I am using the getopts library to parse the command line options, unfortunately that parses them in-order. I've thrown together a system of boolean flags to...
Is functional testing and Integration testing same??
You begin your testing through unit testing... Then after completing unit testing you go for Integration testing where testing the system as a whole. So is functional testing same as Integration testing as in functional testing also, we take the system as a whole and test it for funct...
Is software testing done in the following order?
Unit testing
Integration testing
Functional testing
I want to confirm if Functional testing is done after Integration testing or not.
Thanx
...
Hi Guys..
I have this two objects
class RNB
{
public RNB(double roomRate, double roomDays)
{
RoomRate = roomRate;
RoomDays = roomDays;
}
public double RoomRate { get; set; }
public double RoomDays { get; set; }
public const double BasicLimit = 100;
}
...
I wrote a line of code using lambda to close a list of file objects in python2.6:
map(lambda f: f.close(), files)
It works, but doesn't in python3.1. Why?
Here is my test code:
import sys
files = [sys.stdin, sys.stderr]
for f in files: print(f.closed) # False in 2.6 & 3.1
map(lambda o : o.close(), files)
for f in files: print(...
I wonder if some functional languages are used for web development and which are most useful and supported with that goal?
...
Hi
I have a program that returns int*int
(Example for illustration purposes):
fun program(a,b) = (1,2)
I want to do something along the lines:
fun program(a,b)
if a = 0 then (1,2)
else
val x,y = program(a-1,b)
return (x-1, y)
Basically, I want to manipulate the tuple that is returned, and then return a modific...
As an exercise my team is looking at learning functional programming. One of the factors to choose a language is its support in Eclipse. Any language with Eclipse plug-in is fine but what language offers the best free plug-in?
Bonus question: the best online/book tutorial for this language.
...
How can I pass a function as a variable and then call it using that variable?
e.g.
test(echo);
function test($function)
{
$function("Test");
}
...