<div>Hello,</div>
<div> </div>
<div>I'm new at haskell and I have the following question:</div>
<div> </div>
<div>let's say I type the following:</div>
<div> </div>
<div>function = foldr until</div>
<div> </div>
<div>Now my first question is what is the type of this function? Well let's see what the type of until and foldr is:</div>
<div> </div>
<div>until :: (a -> Bool) -> (a -> a) -> a -> a</div>
<div>foldr :: (a -> b -> b) -> b -> [a] -> b</div>
<div> </div>
<div>So I would be thinking: we fill until in the position of (a -> b -> b) so, a correspond with (a -> Bool) and b correspond with (a -> a) and b correspond with a. Hmm a small problem, I think we can divide that as follows: b1 corresponds with (a -> a) and b2 corresponds with a. So I get:</div>
<div> </div>
<div>foldr until :: b1 -> [a] -> b2</div>
<div>foldr until :: (a -> a) -> [a -> Bool] -> a</div>
<div> </div>
<div>Is this a correct way of thinking or am I wrong?</div>
<div> </div>
<div>And another question is: can someone give me an example how this can be executed? All my code that I tried to execute resulted in errors with "foldr until".</div>
<div> </div>
<div>Thanks!</div>
<div> </div>