Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
4 votes
1 answer
122 views

I'm learning about Haskell and came across this concise, but weird, definition for a function that multiplies three numbers: volume :: Float -> Float -> Float -> Float volume = ((*) .) . (*) ...
0 votes
1 answer
192 views

In my app for unit testing our team heavy rely on tool to execute asynchronous test - ConcurrencyExtras - withMainSerialExecutor That tool add possibility to launch test code on Main Thread, and also ...
2 votes
1 answer
130 views

The problem: compute the length of the longest matched/valid substring of parentheses given a string composed only of ( and ) characters. Here's a naive solution: isValid :: String -> Bool isValid =...
2 votes
2 answers
122 views

What are the conditions on a function of arbitrary number of arguments such that it is able to be refactored to be point free? Is it trivial look at a pointful representation of a function and ...
2 votes
0 answers
178 views

Currently I am working on an hobby/investigation/learning project with the Composable Architecture. So currently I have an issue that I cannot find a nice solution for unless I start to use UIKit ...
1 vote
1 answer
98 views

In Haskell, if you convert a standard dot product of two lists such as dotProduct :: (Num a) => [a] -> [a] -> a dotProduct x y = sum $ zipWith (*) x y through a pointfree tool like pointfree....
hurozen's user avatar
  • 13
0 votes
0 answers
49 views

I'm trying to achieve a point free version of the following example: data Person = Person String Int deriving ( Show, Eq ) data Animal = Animal Person deriving ( Show, Eq ) f :: String -> Int ->...
-2 votes
1 answer
111 views

I have a Haskell function like this: in2out :: String -> String in2out s = show (sumAllLineValues $ lines s) (where sumAllLineValues is defined in my code.) How can I define in2out point-free, ...
halloleo's user avatar
  • 10.9k
0 votes
1 answer
146 views

I am struggling to define correctly the point-free version of the function, which adds 2 elements to the list. It is easy to come up with a number of straightforward trivial implmentations: ...
2 votes
1 answer
255 views

Pattern matching can be implemented using a point free style, and there are many articles on the internet about it. I'm wondering if the more generalized case also holds, i.e. is it possible to ...
Cs_J's user avatar
  • 141
1 vote
1 answer
89 views

I have learned that point-free style is preferred in the Haskell community, and I often write expressions like this: naive = (slugifyUnicode . T.take maxFilenameSize . T.pack . stripHtmlTags . T....
4 votes
2 answers
160 views

Is there a way to express the following in point-free form: g(f(x)(y)) It is not a common 'combinator' as far as I can see, though there are perhaps different ways to express it? I am working in ...
0 votes
1 answer
152 views

I'm a huge fan of functional programming. I strive to use point free notation when I can. However, I often don't understand when point free notation is appropriate or when it is overkill. I typical ...
1 vote
1 answer
246 views

Generalisation of question (read below for specifics to my current problem) Given a function type definition: f :: MonadIO m -> a -> m B where B is a custom datatype B = B {x y z ...} how can I ...
1 vote
3 answers
207 views

I have some data in the form: const data = { list: [1, 2, 3], newItem: 5 } I want to make a function that appends the value of newItem to list resulting in this new version of data: { list: [...

15 30 50 per page
1
2 3 4 5
...
20

AltStyle によって変換されたページ (->オリジナル) /