Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-05-03 18:06:41 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-05-03 18:08:06 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds)
2021-05-03 18:10:12 × rj quits (~x@gateway/tor-sasl/rj) (Client Quit)
2021-05-03 18:10:23 rj joins (~x@gateway/tor-sasl/rj)
2021-05-03 18:10:42 × rj quits (~x@gateway/tor-sasl/rj) (Client Quit)
2021-05-03 18:10:51 × royal_screwup213 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds)
2021-05-03 18:11:14 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-05-03 18:11:29 rj joins (~x@gateway/tor-sasl/rj)
2021-05-03 18:12:59 gonemad3 joins (~gonemad3@185.163.110.100)
2021-05-03 18:13:25 × rj quits (~x@gateway/tor-sasl/rj) (Client Quit)
2021-05-03 18:13:36 rj joins (~x@gateway/tor-sasl/rj)
2021-05-03 18:14:01 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 252 seconds)
2021-05-03 18:14:05 × xff0x quits (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 246 seconds)
2021-05-03 18:14:10 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-05-03 18:14:25 pink35 joins (3e1d44e2@62.29.68.226)
2021-05-03 18:14:27 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-05-03 18:14:52 <pink35> hello everyone can someone tell me whats wrong with the following function?
2021-05-03 18:15:02 <pink35> capitalised [] = []
2021-05-03 18:15:02 <pink35> capitalised x = Char.toUpper (head x) : map Char.toUpper (last x)
2021-05-03 18:15:26 <geekosaur> did you attempt it inside ghci?
2021-05-03 18:15:36 <pink35> i did
2021-05-03 18:15:46 <geekosaur> you need to combine them on the same line
2021-05-03 18:15:59 <geekosaur> use a semicolon to separate the two lines
2021-05-03 18:16:02 <dolio> Or set up your ghci for multi-line input (somehow).
2021-05-03 18:16:09 <pink35> did you understand what my intention is ?
2021-05-03 18:16:15 xff0x joins (~xff0x@2001:1a81:5320:8100:2eab:8db5:7232:a44c)
2021-05-03 18:16:22 <geekosaur> otherwise the second line shadows the first and the empty list case will fail
2021-05-03 18:16:29 <pink35> im trying to make a strings first and last letter uppercase
2021-05-03 18:16:51 <pink35> this is in a file
2021-05-03 18:17:01 <geekosaur> :t last
2021-05-03 18:17:02 <pink35> i mean i tired running in ghci too
2021-05-03 18:17:02 <lambdabot> [a] -> a
2021-05-03 18:17:26 <geekosaur> note the type does not say the output is a list, so you can't map over it
2021-05-03 18:17:46 <pink35> how can i fix it
2021-05-03 18:17:55 × pink35 quits (3e1d44e2@62.29.68.226) (Client Quit)
2021-05-03 18:18:06 × RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 265 seconds)
2021-05-03 18:18:09 <geekosaur> handle the last character the same way you did the first
2021-05-03 18:18:12 pink45 joins (3e1d44e2@62.29.68.226)
2021-05-03 18:18:18 <geekosaur> instead of using map
2021-05-03 18:18:40 <pink45> got disconnected can you type that again, sorry
2021-05-03 18:19:11 <geekosaur> handle the last character the same way you did the first, instead of using map
2021-05-03 18:19:26 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
2021-05-03 18:19:38 <pink45> Couldn't match expected type `[Char]' with actual type `Char'
2021-05-03 18:19:44 <geekosaur> yes
2021-05-03 18:19:55 <pink45> i did not map it this time
2021-05-03 18:19:57 knupfer1 joins (~Thunderbi@200116b82b019d00dd62579678e85afe.dip.versatel-1u1.de)
2021-05-03 18:20:42 <geekosaur> ah, you also need to append an end of list to the result
2021-05-03 18:21:07 <geekosaur> capitalised x = Char.toUpper (head x) : Char.toUpper (last x) : []
2021-05-03 18:21:31 <Clint> pink45: what are you expecting `last` to do?
2021-05-03 18:21:56 <pink45> its not working as i intended now :/
2021-05-03 18:22:06 <pink45> its giving me the just the first and the last
2021-05-03 18:22:07 <geekosaur> <pink35> im trying to make a strings first and last letter uppercase
2021-05-03 18:22:23 <geekosaur> then you need something more involved
2021-05-03 18:22:25 <pink45> i need all of the string  AND last and fist letter to be capital
2021-05-03 18:22:37 × knupfer quits (~Thunderbi@200116b82b019d00bc2b28bf1ce4a9b3.dip.versatel-1u1.de) (Ping timeout: 276 seconds)
2021-05-03 18:22:37 knupfer1 is now known as knupfer
2021-05-03 18:23:05 <Clint> pink45: so the function you want transforms "function" into "FunctioN"?
2021-05-03 18:23:25 <pink45> that is correct
2021-05-03 18:24:22 × oxide quits (~lambda@unaffiliated/mclaren) (Ping timeout: 268 seconds)
2021-05-03 18:24:45 monochrom frowns. "last"? "tail"?
2021-05-03 18:25:06 <monochrom> OK nevermind.
2021-05-03 18:25:29 <pink45> go easy on me :(
2021-05-03 18:26:51 <monochrom> The library has "init" too. It pairs perfectly with "last">
2021-05-03 18:28:09 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-05-03 18:28:29 jamm_ joins (~jamm@unaffiliated/jamm)
2021-05-03 18:30:31 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-05-03 18:30:36 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2021-05-03 18:31:02 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-05-03 18:32:34 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-05-03 18:32:54 heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-05-03 18:32:59 Varis joins (~Tadas@unaffiliated/varis)
2021-05-03 18:34:50 jcarpenter2 joins (~rofl@96.78.87.197)
2021-05-03 18:35:48 <maerwald> init is a weird name though, isn't it?
2021-05-03 18:36:23 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
2021-05-03 18:36:48 <Clint> weirder than the other 3?
2021-05-03 18:37:08 × jrqc quits (~rofl@96.78.87.197) (Remote host closed the connection)
2021-05-03 18:38:11 <maerwald> yeah
2021-05-03 18:39:13 <Clint> how so
2021-05-03 18:39:31 × pink45 quits (3e1d44e2@62.29.68.226) (Quit: Connection closed)
2021-05-03 18:40:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-05-03 18:41:41 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 240 seconds)
2021-05-03 18:44:42 RusAlex joins (~Chel@unaffiliated/rusalex)
2021-05-03 18:52:25 yalm joins (~yalm@unaffiliated/yalm)
2021-05-03 18:53:12 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:d589:6ff2:afb0:b880) (Remote host closed the connection)
2021-05-03 18:53:56 nicholasbulka joins (~nicholasb@2601:900:4301:da0:d589:6ff2:afb0:b880)
2021-05-03 18:55:12 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2021-05-03 18:56:52 royal_screwup213 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-05-03 18:57:01 × v01d4lph4 quits (~v01d4lph4@171.48.62.25) (Remote host closed the connection)
2021-05-03 18:58:31 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:d589:6ff2:afb0:b880) (Ping timeout: 250 seconds)
2021-05-03 18:59:01 × cortexauth quits (~cortexaut@2402:8100:2102:dc69:7032:4b2e:f199:87f0) (Ping timeout: 276 seconds)
2021-05-03 18:59:15 cortexauth joins (~cortexaut@2409:4053:2e1c:481d:bde:e2ed:47a0:636a)
2021-05-03 19:01:20 × royal_screwup213 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2021-05-03 19:01:58 nut joins (~gtk@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2021-05-03 19:02:10 juuandyy joins (~juuandyy@90.106.228.121)
2021-05-03 19:02:21 × vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection)
2021-05-03 19:02:47 vgtw joins (~vgtw@gateway/tor-sasl/vgtw)
2021-05-03 19:02:50 nicholasbulka joins (~nicholasb@2601:900:4301:da0:d589:6ff2:afb0:b880)
2021-05-03 19:05:10 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 252 seconds)
2021-05-03 19:08:37 v01d4lph4 joins (~v01d4lph4@171.48.62.25)
2021-05-03 19:08:46 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:d589:6ff2:afb0:b880) (Ping timeout: 276 seconds)

All times are in UTC.