Git Product home page Git Product logo

blog's Introduction

ABOUT

This is just a collection of articles related to coding.

ARTICLES

Monads in go:

Monads abstract the context of a computation. Where "context" could be quantity (a list), availability (a thing that can be nil), fallibility (something that, when executed, can produce an error), asynchronous execution (something that is not yet present), etc. And computation is just applying a function to the value whithin the context, and the result will be in the same context. Here's the list of monadic go:

  • monadic lists List is the context that is easier to be used to explain the concept of a monad, so let's use it.

  • monadic optional/nil(coming soon) It's very common to use a pointer to represent a value that may not exist. In this article I suggest another approach to handle presense/absence of a value.

  • monadic fallibility(coming soon) The way go handles errors is returning a value of error type. It's a common pattern to return (something, error) tuple. Unfortunately, tuples are not first-class citizen in go. You can't wrap them on a type. But we can work around this limitation and build a monadic abstraction on top of this pattern.

  • monadic channels(coming soon) In this example I'm working with channels + goroutines as asynchronous context. And abstracting them I can offer another way ot thinking in concurrency. I will work with the WebCrawler exercise of a tour of go

  • state monad in go This is a sequence of three articles that explain (1) how to implement the state monad in go, (2) an arbitrary pseudo-random values generator, and (3) property-based testing using the pseudo-random values generator we implemented.

blog's People

Contributors

elfrucool avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.