Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/lutilPublic

LFE Utility Modules (successor to lfe-utils)

License

NotificationsYou must be signed in to change notification settings

lfex/lutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusLFE VersionsErlang VersionsTagsDownloads

Utility functions for LFE

Project Logo

Contents

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>

[8]ページ先頭

©2009-2025 Movatter.jp