Filter
Exclude
Time range
-
Near
Alright, let’s dive into the wild world of *monads* with a thread that’s equal parts mind-bending and fun! 🧵 Buckle up, whether you're a Haskell hero or just curious let’s make monads less mysterious! 🚀 #functionalprogramming #monads 🟣First off, what’s a @monad? Think of it as a design pattern in functional programming a way to wrap values, chain operations, and handle side effects like a pro. It’s like a burrito 🌯: the tortilla (monad) holds the tasty stuff (your data) together! #coding 🟣Monads shine in languages like Haskell, but their ideas pop up everywhere. They’re all about *structure* and *control*. Got messy code with errors, async ops, or state? Monads keep things tidy, predictable, and composable. 🧹 #softwaredev 🟣 Let’s break it down. A monad has three key parts: - **Wrap**: Puts a value into a monadic context (e.g., `Just 42` for Maybe). - **Bind**: Chains operations, passing the wrapped value along (`>>=` in Haskell). - **Return**: Injects a plain value into the monad. Sounds abstract? Let’s get practical! 🤓 🟣 Example: the **Maybe** monad. It handles computations that might fail. Say you’re dividing numbers, but division by zero is a no-no. Maybe wraps results as `Just value` or `Nothing`. No crashes, just smooth error handling! 😎 #Haskell 🟣 Code time! Here’s Maybe in action: ```haskell safeDiv :: Int -> Int -> Maybe Int safeDiv _ 0 = Nothing safeDiv x y = Just (x `div` y) ``` Chain it with `>>=`: ```haskell Just 10 >>= (\x -> safeDiv x 2) -- Just 5 Just 10 >>= (\x -> safeDiv x 0) -- Nothing ``` No explosions! 🎉 #functional 🟣 Another star: the **List** monad. It’s great for non-deterministic computations. Want all possible pairs from two lists? List monad’s got you: ```haskell [1,2] >>= \x -> [3,4] >>= \y -> return (x,y) -- [(1,3),(1,4),(2,3),(2,4)] ``` It’s like magic for combinations! 🪄 🟣 Monads aren’t just for nerds—they solve real problems! The **IO** monad in Haskell handles input/output (like reading files or user input) while keeping your code pure. No sneaky side effects messing up your logic. 🛡️ #programming 🟣Why care? Monads let you: - Handle errors gracefully (Maybe, Either) - Manage state without mutability (State monad) - Write cleaner async code (Promise in JS is monad-ish!) - Chain operations elegantly It’s like giving your code superpowers. 💪 #devlife 🟣 Still confused? That’s okay! Monads are a “learn by doing” thing. Play with them in Haskell, Scala, or even JavaScript (Promises are close cousins). Once it clicks, you’ll see why FP fans rave about them. 😍 #learntocode 🟣 Want to dive deeper? Check out: - “Learn You a Haskell for Great Good!” (free online) - X posts from @haskellcats or @fpcomplete for tips - Try coding with Maybe or List monads in a REPL Monads are less scary than they seem promise! 😉 #codingjourney 🟣 Final thought: Monads are like LEGO bricks for functional programming. They let you build complex, reliable systems from simple, reusable parts. Embrace the monad, and your code will thank you! 🧱✨ #softwareengineering What’s your fave monad or functional programming trick? Drop it below! 👇 #letstalkcode
1
2
27
14 Jun 2019
Rocco, and all the campers, did such a great job sharing their knowledge at the Coding Camp Exposition today!! Amazing to hear 3,4, & 5th graders speaking so fluently about code. Phenomenal camp! @AmyRoediger @tomhoganish @mentorschools @LetsTalkCode #onceacard
1
16
Getting our code on today #LetsTalkCode, making sambos and having a laugh ⁦@AppleEDU#AppleEDUchat #LearnAchieveSucceed
2
Getting our code on today #LetsTalkCode, making sambos and having a laugh ⁦@AppleEDU#AppleEDUchat #LearnAchieveSucceed
3
7
😍 EXCITING NEWS - the first webinar in our #letstalkcode series is now open for registration! Full Stack #Java expert Kevin Timmins on #Microservices - covering what to watch out for and what you can do to enable progress... Regsiter >>> buff.ly/2OTrKsx] #code #coding
1
2
The first ever Hack{Cyprus} Summit is officially concluded. The summit took more than 1 year to build, making sure that is an event by the community for the #tech community. #hackcyprus #letstalkcode #cyprus #hackcyprussummit buff.ly/2iH1C1U @hackcyprus @CyEntLink

1
"Hackathon is like a marathon, so don't burn your self from the first hour!" as told by Stefanos Chrs hackathon expert and full stack developer at CS Circles. #lasttalkoftheday #hackCyprus #letstalkcode ift.tt/2irnaPL
3
"Developing a slack clone in under 30 minutes?" Kyriakos Toumbas, CTO at Pixel Actions, says challenge accepted! #hackCyprus #letstalkcode #toomanyclonesintheroom ift.tt/2irnaPL
2
Zero to live in 30 minutes! Let's go! #hackcyprus #letstalkcode ift.tt/2AU3n2o
2
Stelios on penetration testing.. Hello #assembly code! #hackcyprus #letstalkcode #capturetheflag #mrrobot ift.tt/2zg9zFB
2
Stelios Joannou, researcher from CS Circle, guiding our audience on how to "capture the flag". #hackCyprus #letstalkcode ift.tt/2irnaPL
1
The PenTesters trio, Simon, Marios & Nicolas, from RUNESEC, demonstrating common security pitfalls for web developers. #hackCyprus #letstalkcode ift.tt/2irnaPL
3
"Let's hacking hack" brings up memories! live penetration testing now at #hackcyprus #letstalkcode ift.tt/2zQDmE4
3
Some enjoy lunch, while others work in the dark. Kyriakos Toumbas getting ready for his afternoon workshop! #hackCyprus #letstalkcode ift.tt/2irnaPL
1
1
Hello little Katerina! Let me introduce you to our newest member! #hackcyprus #hackcyprus2.0 #letstalkcode ift.tt/2B1FKWw
2
5
A big thank you goes to Deloitte as well for supporting the first hack{cyprus}summit. #hackCyprus #letstalkcode ift.tt/2irnaPL
1
1
Training our computers to identify cats on images with TensorFlow and Μαριάνκχ. #hackCyprus #makeCode #letstalkcode ift.tt/2irnaPL
1
1