Newest at the top
| 2025-12-03 16:48:12 +0100 | <Leary> | `Witherable`, probably. |
| 2025-12-03 16:46:53 +0100 | <__monty__> | I wasn't really asking about lists though. More like anything Foldable or Somethingable if folds are not a powerful enough concept to capture the behavior. |
| 2025-12-03 16:45:34 +0100 | <kuribas`> | __monty__: tbf if you really care about performance, you shouldn't use linked lists. |
| 2025-12-03 16:44:33 +0100 | lambda_gibbon | (~lambda_gi@208.83.175.39) |
| 2025-12-03 16:44:30 +0100 | <kuribas`> | ah no, it's added |
| 2025-12-03 16:41:18 +0100 | <__monty__> | Oh, it's not. |
| 2025-12-03 16:41:05 +0100 | <__monty__> | Probably because it's partial? |
| 2025-12-03 16:40:02 +0100 | <kuribas`> | removed apparently... |
| 2025-12-03 16:39:54 +0100 | tromp | (~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-12-03 16:38:06 +0100 | <kuribas`> | https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-List.html#v:tails1 |
| 2025-12-03 16:35:54 +0100 | <lambdabot> | Suggested fix: |
| 2025-12-03 16:35:54 +0100 | <lambdabot> | Variable not in scope: tails1 |
| 2025-12-03 16:35:54 +0100 | <lambdabot> | error: [GHC-88464] |
| 2025-12-03 16:35:51 +0100 | <kuribas`> | :t tails1 |
| 2025-12-03 16:33:59 +0100 | Googulator40 | (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Ping timeout: 250 seconds) |
| 2025-12-03 16:33:02 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2025-12-03 16:32:44 +0100 | <__monty__> | "Foldr the init of the tails" is not quite the elegance I was hoping for but it does make foldr more useful still. |
| 2025-12-03 16:31:10 +0100 | <__monty__> | Yeah, that works. |
| 2025-12-03 16:30:47 +0100 | Googulator88 | (~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu) |
| 2025-12-03 16:29:14 +0100 | Square2 | (~Square4@user/square) (Ping timeout: 260 seconds) |
| 2025-12-03 16:28:37 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 265 seconds) |
| 2025-12-03 16:27:54 +0100 | <lambdabot> | [2,4,6,8,10,12,14,16,18,20] |
| 2025-12-03 16:27:51 +0100 | <kuribas`> | > foldr (\(x:xs) xs2 -> if False then (x:xs) else (x*2) : xs2) [] (init $ tails [1..10]) -- __monty__ |
| 2025-12-03 16:27:23 +0100 | <__monty__> | Yes, already mentioned that. |
| 2025-12-03 16:26:09 +0100 | akegalj | (~akegalj@141-138-27-206.dsl.iskon.hr) (Quit: leaving) |
| 2025-12-03 16:22:58 +0100 | st_aldini | (~Thunderbi@2605:a601:a07c:7400:6e26:f360:f11d:472c) st_aldini |
| 2025-12-03 16:22:30 +0100 | st_aldini | (~Thunderbi@2605:a601:a07c:7400:6e26:f360:f11d:472c) (Quit: st_aldini) |
| 2025-12-03 16:21:12 +0100 | aljazmc | (~aljazmc@user/aljazmc) aljazmc |
| 2025-12-03 16:16:54 +0100 | <lucabtz> | yep |
| 2025-12-03 16:16:46 +0100 | <lambdabot> | [2,4,6,8,10,6,7,8,9,10] |
| 2025-12-03 16:16:43 +0100 | <kuribas`> | > let (xs, ys) = break (> 5) [1..10] in map (*2) xs ++ ys |
| 2025-12-03 16:16:26 +0100 | bitdex_ | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 2025-12-03 16:15:59 +0100 | <kuribas`> | sure |
| 2025-12-03 16:15:40 +0100 | <lucabtz> | or span |
| 2025-12-03 16:15:27 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) sord937 |
| 2025-12-03 16:15:15 +0100 | <kuribas`> | break? |
| 2025-12-03 16:15:02 +0100 | <lucabtz> | kuribas` if there is no state can't you just use break |
| 2025-12-03 16:14:07 +0100 | califax_ | califax |
| 2025-12-03 16:14:06 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 272 seconds) |
| 2025-12-03 16:14:06 +0100 | califax | (~califax@user/califx) (Ping timeout: 272 seconds) |
| 2025-12-03 16:14:06 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 272 seconds) |
| 2025-12-03 16:13:49 +0100 | chexum_ | (~quassel@gateway/tor-sasl/chexum) chexum |
| 2025-12-03 16:12:22 +0100 | califax_ | (~califax@user/califx) califx |
| 2025-12-03 16:11:00 +0100 | <lambdabot> | [2,4,6,8,5,6,7,8,9,10] |
| 2025-12-03 16:11:00 +0100 | <__monty__> | But the idea works. |
| 2025-12-03 16:10:56 +0100 | <kuribas`> | > foldr (\(x:xs) cont s -> if (s > 7) then (x:xs) else (x*2) : cont (s+x)) (const []) (tails [1..10]) 0 |
| 2025-12-03 16:10:56 +0100 | spew | (~spew@user/spew) spew |
| 2025-12-03 16:10:44 +0100 | <__monty__> | This is the missing case analysis I was referring to. |
| 2025-12-03 16:10:39 +0100 | spew | (~spew@user/spew) (Quit: nyaa~) |
| 2025-12-03 16:10:30 +0100 | <lambdabot> | [2,4,6,8,10,12,14,16,18,20*Exception: <interactive>:3:8-59: Non-exhaustive p... |