Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

public Flux<Entity> getRatesFlux(String hash, String apiUrl) { // url is a restfull parameters in path return RatesReactiveRepository .findAll() .flatMap(rate -> { ...
SkyBlackHawk's user avatar
2 votes
1 answer
84 views

I'm currently learning Haskell, and I am stuck with the following conundrum. What is wrong with the following construction?: zip [1,2,3] [4,5,6] Result: [(1,4),(2,5),(3,6)] zipWith (+) [1,2,3] [4,5,6]...
kesarling's user avatar
  • 2,338
0 votes
1 answer
166 views

This problem came up when I was trying to zip through lists of different length and I didn't want them to be cut by the shortest one. It was in a context where the list had integers that I wanted to ...
Marco_O's user avatar
  • 111
0 votes
1 answer
374 views

I want to write a function that checks if two lists are "almost" equal. The first parameter d is used for precision - the difference between the elements must not exceed d. For example, ...
blair's user avatar
  • 21
0 votes
2 answers
201 views

With the following zipWith expression: zipWith3 (\foos bars bazs -> case (foos, bars, bazs) of (foo, bar, Just baz) -> Right "hell yeah" (foo, bar, Nothing) -> Left "...
Jivan's user avatar
  • 23.4k
3 votes
0 answers
135 views

Currently, I found some strange behavior in my function. I have a transformation function that transforms from (x,a,b) -> (x,y,z). I'm using Data.Vector.Storable since I'm communicating with some ...
blauerreimers's user avatar
2 votes
1 answer
79 views

I'm relatively new to Haskell. I'm trying to create a function zipWithMult :: (a -> b -> c) -> MultTree a -> MultTree b -> MultTree c that behaves similar to the function zipWith for ...
AndreasSt's user avatar
  • 183
1 vote
2 answers
106 views

I have a hard time understanding this application of zipwith in Prolog and wondered if someone gets it. I already have an idea of what functor does, but I don't see how it applies in that case. I ...
CoffeeRun's user avatar
0 votes
1 answer
3k views

I have recently been learning reactive programming using the reactor libraries in Java with the Spring framework and for the most part I have been able to get to grips with it. However, I've found ...
YoungCarrdinal's user avatar
6 votes
3 answers
710 views

I want to sum a zipped list. averageGrade :: [Float] -> [Int] -> Float averageGrade [0.75 , 0.25] [6, 4] , result: 0,75*6 + 0.25*4 = 5.5 when I go to ghci and do the following: sum(zipWith (*)...
Sorun's user avatar
  • 143
2 votes
1 answer
993 views

I am trying to write zipWith function using zip and list comprehension. I need to zip the two lists after the function is applied. However I don't know where to use the list comprehension. I tried ...
Kale Joe's user avatar
  • 161
1 vote
2 answers
442 views

I saw this implementation of the Fibonacci numbers in Haskell and I am still trying to figure out why this works properly. So apperently, the Fibonacci numbers can be written in a very compact way ...
Jan Kreischer's user avatar
4 votes
3 answers
2k views

I was wondering if any function exist that can do something like that I already tried zipWith and some variations of the map, but no good results. Only working solution to this is 2x ForEach, but I ...
Łukasz Nizioł's user avatar
1 vote
1 answer
207 views

data Tegel = Teg Int Int type RijTegels = [Tegel] volleRijTegels :: RijTegels volleRijTegels = ziptwee [21..36] (replicate 4 1 ++ replicate 4 2 ++ replicate 4 3 ++ replicate 4 4) ziptwee :: [Int] -&...
Elzine Burger's user avatar
0 votes
1 answer
402 views

I am doing this in Haskell. I am trying to add two lists to gather and I am using zipWith function to do this. But the data type won't match with my add function. this is what i have tried add :: [[...
user avatar

15 30 50 per page