Egg.Lark 16.2.2303.17

dotnet add package Egg.Lark --version 16.2.2303.17
NuGet\Install-Package Egg.Lark -Version 16.2.2303.17
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Egg.Lark" Version="16.2.2303.17" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Egg.Lark --version 16.2.2303.17
#r "nuget: Egg.Lark, 16.2.2303.17"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Egg.Lark as a Cake Addin
#addin nuget:?package=Egg.Lark&version=16.2.2303.17

// Install Egg.Lark as a Cake Tool
#tool nuget:?package=Egg.Lark&version=16.2.2303.17

百灵鸟函数式脚本(Egg.Lark)

Egg开发套件中关于百灵鸟函数式脚本引擎(Lark Script Engine)支持的可选组件;

函数式脚本

脚本整体就是一个函数,但函数的参数可以是另一个函数定义,由此自由展开形成丰富的功能实现;

脚本示例

以下为一个计算累加并输出的简单脚本:

@(
    # while 循环 #
    let(num, 100)
    let(a, 1)
    let(sum, 0)
    while(small_equal(a, num), @(
        let(sum, !(sum + a))
        let(a, !(a + 1))
    ))
)

基础函数

为了能让脚本工作更为顺利,引擎中内置了一些基础函数;

逐句执行函数(@)

使用此函数可以让函数中的参数依次执行:

@(func1, func2, ... , fnucN)

赋值函数(let)

使用此函数可以让后参数的内容赋值给前函数:

let(var, value)

运算函数(+-*/)与四则混合运算语法糖(!)

使用此类函数可以进行数值运算并返回结果:

+(num1, num2, ... , numN)
-(num1, num2, ... , numN)
*(num1, num2, ... , numN)
/(num1, num2, ... , numN)

使用!函数定义可触发四则混合运算解析,如以下第一句脚本将会被解析为第二句:

!((a + 1) * 2)
*(+(a, 1), 2)

字符串连接函数($)

使用此函数可以让函数中的参数依次拼接为一个新的字符串:

$(var1, var2, ... , varN)

判断函数(if)

使用判断函数可以通过判断首参数的值来决定执行第二个参数还是第三个参数中的函数:

if(var, funcTrue, funcFalse)

判断循环函数(while)

使用判断循环函数可以通过循环判断首参数的值来循环执行第二个参数中的函数:

while(var, func)

规律循环函数(for)

使用规律循环函数可以通过设置初始值、终点值、每次变化值来循环执行参数中的函数:

for(var, start, end, change, func)

依次循环函数(foreach)

使用依次循环函数可以通过遍历列表/字典来循环执行参数中的函数:

for(var, list, func)

相等判断函数(equal)

使用相等判断函数可以对比两个参数值是否相等并返回结果:

equal(var1, var2)

比较函数(compare)

使用相等判断函数可以对比两个数字参数值,前函数较大则返回1,相同则返回0,较小则返回-1:

compare(var1, var2)

取反函数(not)

使用取反函数可以取参数的反结果:

not(var1)

同时成立函数(and)

使用同时成立函数将对比所有参数值,均为真时才返回为真:

and(var1, var2, ... , varN)

单一成立函数(or)

使用单一成立函数将对比所有参数值,只需有一个为真时即返回为真:

or(var1, var2, ... , varN)

注释关键字(#)

使用#来定义注释或结束注释定义,如:

# 这是整行注释
let(a, 1)
# 这是部分注释 # let(a, 1)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • Egg (>= 16.2.2303.17)

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
16.2.2303.17 670 3/28/2023
16.2.2303.16 646 3/25/2023
16.2.2303.15 689 3/16/2023
16.2.2303.14 651 3/11/2023
16.2.2303.13 670 3/4/2023
16.1.2301.12 780 1/19/2023
16.1.2301.11 720 1/18/2023
16.1.2301.10 745 1/18/2023
16.1.2301.9 707 1/18/2023
16.1.2301.8 710 1/15/2023
12.3.2206.59 874 6/1/2022
6.2.2201.58 900 1/13/2022
6.1.2112.57 604 1/7/2022
6.1.2112.56 603 12/29/2021
6.1.2112.55 704 12/29/2021
6.1.2112.54 680 12/29/2021
6.1.2112.53 666 12/29/2021
6.1.2112.52 711 12/27/2021
6.1.2112.51 657 12/26/2021
6.1.2112.50 624 12/26/2021
6.1.2112.49 691 12/26/2021
6.1.2112.48 635 12/26/2021
6.1.2112.47 676 12/26/2021
6.1.2112.46 645 12/26/2021
6.1.2112.45 705 12/24/2021
6.1.2112.44 697 12/24/2021
6.1.2112.43 722 12/24/2021
6.1.2112.42 667 12/24/2021
6.1.2112.41 727 12/24/2021
6.1.2112.40 675 12/24/2021
6.1.2112.39 647 12/23/2021
6.1.2112.38 694 12/23/2021
6.1.2112.36 674 12/22/2021
6.1.2112.35 669 12/22/2021
6.1.2112.34 653 12/21/2021
6.1.2112.33 670 12/21/2021
6.1.2112.32 675 12/17/2021
6.1.2112.31 735 12/17/2021
6.1.2112.30 651 12/17/2021
6.1.2112.29 657 12/16/2021
6.1.2112.28 687 12/15/2021
6.1.2112.27 698 12/8/2021
6.1.2112.26 964 12/8/2021
6.1.2112.25 937 12/8/2021
6.1.2112.24 711 12/7/2021
6.1.2112.23 666 12/7/2021
6.1.2112.22 954 12/6/2021
6.0.2111.20 725 11/22/2021
1.1.2111.18 724 11/7/2021
1.0.2110.17 748 10/29/2021
1.0.2110.16 723 10/26/2021
1.0.2110.15 774 10/25/2021
1.0.2110.14 843 10/23/2021
1.0.2110.13 748 10/22/2021
1.0.2110.12 738 10/20/2021
1.0.2110.11 713 10/20/2021
1.0.2110.10 737 10/20/2021
1.0.2110.9 810 10/16/2021
1.0.2110.8 738 10/13/2021
1.0.2110.7 709 10/13/2021
1.0.2110.6 726 10/13/2021
1.0.2110.5 746 10/12/2021
1.0.2110.4 728 10/9/2021
1.0.2110.3 710 10/9/2021
1.0.2110.2 731 10/7/2021
1.0.2110.1 749 10/4/2021