#--- # Excerpted from "Advanced Functional Programming with Monads in Elixir", # published by The Pragmatic Bookshelf. # Copyrights apply to this code. It may not be used to create training material, # courses, books, articles, and the like. Contact us if you are in doubt. # We make no guarantees that this code is fit for any purpose. # Visit https://pragprog.com/titles/jkelixir for more book information. #--- defprotocol FunPark.Foldable do def fold_l(structure, transform_fn, base) def fold_r(structure, transform_fn, base) end