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
/scopePublic

Scope is a small module that provides two macros to facilitate function overload and local import/aliases execution.

License

NotificationsYou must be signed in to change notification settings

xvw/scope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scope is a small module that provides two macros to facilitatefunction overload and local import/aliases execution.

Overload functions

importScopeoverload[+:2,-:2],from:Kernel,with:Test1+3-2# gives [2, [1, 3]]

Local importation

You can just import one or more module :

importScopex=localSystemdouser_home<>" !"end# Or multiple moduley=localElixir.{System,Path}doabsname(user_home())end# Or specifics function from a modulez=local[user_home:0,user_home!:0]inSystemdouser_home<>" !"end

You can also directly use an expression:

importScopea=local(overload[+:2,-:2],from:Kernel,with:Test)do1+2-3endb=1+2-3# a == [3, [1, 2]]# b == 0c=local(importTest)doa=1+2b=1-2a-bend

Installation

Ifavailable in Hex, the package can be installedby addingscope to your list of dependencies inmix.exs:

defdepsdo[{:scope,"~> 1.0.0"}]end

Documentation can be generated withExDocand published onHexDocs. Once published, the docs canbe found athttps://hexdocs.pm/local.

About

Scope is a small module that provides two macros to facilitate function overload and local import/aliases execution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp