May. 28th, 2018

juan_gandhi: (Default)
Monomorphism restriction.

-- This yields f1 :: (Show x) => x -> String
f1 x = show x
 
-- But this doesn't. Instead, f2 :: () -> String
f2 = \x -> show x
 
-- ...but we can fix that with an explicit type signature.
f3 :: (Show a) => a -> String
f3 = \x -> show x
 
-- Similarly this produces () -> String
f4 = show
 
-- ...but this is allowed
f5 :: (Show a) => a -> String
f5 = show
 
juan_gandhi: (Default)
Здравствуйте! Я могу вам чем-то помочь?9:12Начнем с теста тьюринга. Вы не робот?9:17НатальяДобрый вечер!Я консультант по взаимодействию с сайтом.9:19




Ага, значит робот. Сколько будет 2/(2-2)?
 

9:19
Ага, значит робот. Сколько будет 2/(2-2)?9:20НатальяЯ не робот. У вас есть вопросы по взаимодействию с сайтом?Ответ: 0

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

September 2025

S M T W T F S
 1 2345 6
78 9 10 111213
14 151617 181920
212223 24252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 28th, 2025 10:59 pm
Powered by Dreamwidth Studios