Tagged Questions
1
vote
1answer
44 views
Recursive Determinant
The following code I devised to compute a determinant:
module MatrixOps where
determinant :: (Num a, Fractional a) => [[a]] -> a
determinant [[x]] = x
determinant mat =
sum [s*x*(determinant ...
3
votes
1answer
93 views
The eternal dilemma: bar.foo() or foo(bar)?
I was using foo(bar) as it's adopted for functional programming.
console.log(
join(
map(function(row){ return row.join(" "); },
tablify(
...
3
votes
2answers
119 views
Palindrome test in Haskell
I am new to Haskell and, coming from a OO/procedural programming background, I want to make sure my code follows the functional way of doing things. I built this short module to test if a given string ...
5
votes
1answer
321 views
Optimizing and consolidating a big jQuery function
I understand this is a very vague question and a lot of code to look over. My question is basically: I have all these functions that work together to create functionality on a page: is the structure ...
5
votes
4answers
532 views
Improving my solution to Project Euler problem #1?
I'm trying to compare my own implementation with another solution of ProjectEuler problem #1, which uses a list comprehension:
module Progression1 (sumProgressions) where
import Prelude
...