package ppx_monad

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file ppx_monad_ppx_seq.ml

1
2
3
4
5
6
7
8
9
10
open Ppxlib

let mk_return ~loc x =
  [%expr Stlib.Seq.return [%e x]]

let mk_bind ~loc e f =
  [%expr Stdlib.Seq.flat_map [%e f] [%e e]]

let () = Ppx_monad_lib.register "seq"
    ~mk_return ~mk_bind
OCaml

Innovation. Community. Security.