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 671 3/28/2023
16.2.2303.16 647 3/25/2023
16.2.2303.15 690 3/16/2023
16.2.2303.14 652 3/11/2023
16.2.2303.13 671 3/4/2023
16.1.2301.12 782 1/19/2023
16.1.2301.11 721 1/18/2023
16.1.2301.10 746 1/18/2023
16.1.2301.9 708 1/18/2023
16.1.2301.8 711 1/15/2023
12.3.2206.59 876 6/1/2022
6.2.2201.58 902 1/13/2022
6.1.2112.57 605 1/7/2022
6.1.2112.56 604 12/29/2021
6.1.2112.55 705 12/29/2021
6.1.2112.54 681 12/29/2021
6.1.2112.53 667 12/29/2021
6.1.2112.52 712 12/27/2021
6.1.2112.51 658 12/26/2021
6.1.2112.50 625 12/26/2021
6.1.2112.49 692 12/26/2021
6.1.2112.48 636 12/26/2021
6.1.2112.47 677 12/26/2021
6.1.2112.46 646 12/26/2021
6.1.2112.45 706 12/24/2021
6.1.2112.44 698 12/24/2021
6.1.2112.43 723 12/24/2021
6.1.2112.42 668 12/24/2021
6.1.2112.41 729 12/24/2021
6.1.2112.40 676 12/24/2021
6.1.2112.39 648 12/23/2021
6.1.2112.38 695 12/23/2021
6.1.2112.36 675 12/22/2021
6.1.2112.35 670 12/22/2021
6.1.2112.34 654 12/21/2021
6.1.2112.33 671 12/21/2021
6.1.2112.32 676 12/17/2021
6.1.2112.31 736 12/17/2021
6.1.2112.30 652 12/17/2021
6.1.2112.29 658 12/16/2021
6.1.2112.28 688 12/15/2021
6.1.2112.27 699 12/8/2021
6.1.2112.26 966 12/8/2021
6.1.2112.25 938 12/8/2021
6.1.2112.24 712 12/7/2021
6.1.2112.23 667 12/7/2021
6.1.2112.22 955 12/6/2021
6.0.2111.20 726 11/22/2021
1.1.2111.18 725 11/7/2021
1.0.2110.17 749 10/29/2021
1.0.2110.16 724 10/26/2021
1.0.2110.15 784 10/25/2021
1.0.2110.14 845 10/23/2021
1.0.2110.13 749 10/22/2021
1.0.2110.12 739 10/20/2021
1.0.2110.11 714 10/20/2021
1.0.2110.10 738 10/20/2021
1.0.2110.9 812 10/16/2021
1.0.2110.8 739 10/13/2021
1.0.2110.7 710 10/13/2021
1.0.2110.6 727 10/13/2021
1.0.2110.5 747 10/12/2021
1.0.2110.4 729 10/9/2021
1.0.2110.3 711 10/9/2021
1.0.2110.2 732 10/7/2021
1.0.2110.1 750 10/4/2021