2018-04-20

juan_gandhi: (Default)
2018-04-20 11:28 am

изменения в графике

График отключения горячей воды в Москве изменили из-за ЧМ-2018

 
juan_gandhi: (Default)
2018-04-20 11:54 am
Entry tags:

вопрос евреям

 А я что-то не соображу, Моисею зачем-то понадобилось тащиться сквозь Красное море - а нельзя было в обход? Ведь суэцкого канала еще не было тогда; да если бы и был, его легче ж пересечь, наверно.
juan_gandhi: (Default)
2018-04-20 06:35 pm
Entry tags:

вопрос хаскельщикам

true x y = x
false x y = y

lampair :: a -> b -> (a -> b -> c) -> c
lampair x y p = p x y

pa :: ((a -> b -> c) ->c) -> a
pa p = p true


And I see
   • Couldn't match type ‘a’ with ‘c’
      ‘a’ is a rigid type variable bound by
        the type signature for:
          pa :: forall a b c. ((a -> b -> c) -> c) -> a
        at sample1.hs:8:1-30
      ‘c’ is a rigid type variable bound by
        the type signature for:
          pa :: forall a b c. ((a -> b -> c) -> c) -> a
        at sample1.hs:8:1-30
      Expected type: a -> b -> c
        Actual type: c -> b -> c
    • In the first argument of ‘p’, namely ‘true’
      In the expression: p true
      In an equation for ‘pa’: pa p = p true
    • Relevant bindings include
        p :: (a -> b -> c) -> c (bound at sample1.hs:9:4)
        pa :: ((a -> b -> c) -> c) -> a (bound at sample1.hs:9:1)
  |


What have I done wrong? What fails here? Is Hindley-Milner "not smart enough"? What am I missing?