- Notifications
You must be signed in to change notification settings - Fork8
LFE Utility Modules (successor to lfe-utils)
License
lfex/lutil
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Utility functions for LFE
Introduction↟
lutil offers several modules and macros with convenience functions that canbe easily incorporated into projects without having to re-implement theselittle functions all the time.
lutil also explores new LFE functions and macros that may be of interest toLFE-proper; if they fare well here, we will submit proposals for inclusion.
Note that with the release of 0.14, many deprecated functions and macros that haveeither been moved into LFE itself or other LFE libraries were removed and areno longer available in the library. The last version with those functionspresent is 0.13.5.
Dependencies↟
As of version 0.7.0, this project assumes that you haverebar3 installed somewhere in your$PATH
.It no longer uses the old version of rebar. If you do not wish to use rebar3,you may use the most recent rebar2-compatible release of lutil: 0.6.7.
Installation↟
In yourrebar.config
file, update yourdeps
section to includelutil
:
{deps, [ {lutil,"0.16.0"}}}]}
Usage↟
Modules↟
For the modules, usage is the same as any other Erlang or LFE library :-)
Some example usage:
> (lutil-math:dot-product'(123)'(456))32> (lutil-tuple:cat (tuple12) (tuple34))#(1234)> (lutil-tuple:cat (list (tuple12) (tuple34) (tuple56)))#(123456)lfe> (lutil-list:chunks (lists:seq132)8#(by-parts))((1234) (5678) (9101112) (13141516) (17181920) (21222324) (25262728) (29303132))lfe> (lutil-list:chunks (lists:seq132)8#(by-length))((12345678) (910111213141516) (1718192021222324) (2526272829303132))
Macros↟
lutil offers thecreate-table
macro for use with more easily workinggenerating Mnesia tables. Example usage is availablehere.
If you are looking for the Clojure macros which used to be in lutil, they havean interesting history: they were first moved to their own project, and thenadded to theLFE stdlib!
License↟
BSD 3-Clause License
Copyright © 2013-2025, Duncan McGreggor <oubiwann@gmail.com>Copyright © 2016, Eric Bailey <eric@ericb.me>Copyright © 2015, arpunk <arpunk@cryptolab.net> osense <krupicka.adam@gmail.com>Copyright © 2014, Torbjorn Tornkvist <kruskakli@gmail.com> Døkkarr Hirðisson <dokkarr@lfe.io> Dreki Þórgísl <dreki@billo.systems>\Copyright © 2009, Tim Dysinger <tim@dysinger.net>
About
LFE Utility Modules (successor to lfe-utils)