Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
::
| | _ | |'| || |,|igher-order function coding.
TL;DR - YAGNI.
Inspired by Haskell <http://www.haskell.org/>
's rich set of operators,
this is an approach to functional programming with operators in Python <http://www.python.org/>
.
"It's fun... It's insane... It's insanely fun."
-- John Doe
<<
, &
|
**
~
::
from fx import f double_all = f(map) << 2 .mul | list double_all([1, 2, 3]) [2, 4, 6] double_all |= f(map) << str | ' '.join double_all([1, 2, 3]) '2 4 6' sum_upto = 1 .add | f(range) << 1 | sum sum_upto(100) 5050 parse_hex_str = ~f(int) << 16 parse_hex_str('ff') 255 parse_hex_str('c0ffee') 12648430
project euler problem 1
euler_p1 = f(range) << 1 | f(filter) << (lambda n: n % 3 == 0 or n % 5 == 0) | sum euler_p1(10) 23 euler_p1(1000) 233168
project euler problem 20
fact = f(lambda n: 1 if n == 1 else n * fact(n - 1)) euler_p20 = str ** fact | sum ** f(map) << int euler_p20(10) 27 euler_p20(100) 648
Install from PyPI::
pip install fx
Install from source, download source package, decompress, then cd
into source directory, run::
make install
BSD New, see LICENSE for details.
Documentation: http://fx.readthedocs.org/
Issue Tracker: https://bitbucket.org/pyx/fx/issues/
Source Package @ PyPI: http://pypi.python.org/pypi/fx/
Mercurial Repository @ bitbucket: https://bitbucket.org/pyx/fx/
Git Repository @ Github: https://github.com/pyx/fx/
FAQs
fx - a functional programming approach
We found that fx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.