-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
mvel.scroll
55 lines (46 loc) · 2.15 KB
/
mvel.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import ../code/conceptPage.scroll
id mvel
name MVEL
appeared 2003
tags pl
isOpenSource true
centralPackageRepositoryCount 0
country Italy and Canada
originCommunity https://github.com/mvel
lineCommentToken //
hasLineComments true
// A comment
hasComments true
// A comment
hasSemanticIndentation false
wikipedia https://en.wikipedia.org/wiki/MVEL
example
import java.util.*;
// the main quicksort algorithm
def quicksort(list) {
if (list.size() <= 1) {
list;
}
else {
pivot = list[0];
concat(quicksort(($ in list if $ < pivot)), pivot, quicksort(($ in list if $ > pivot)));
}
}
// define method to concatenate lists.
def concat(list1, pivot, list2) {
concatList = new ArrayList(list1);
concatList.add(pivot);
concatList.addAll(list2);
concatList;
}
// create a list to sort
list = [5,2,4,1,18,10,15,1,0];
// sort it!
quicksort(list);
related java xml lisp ognl
summary MVFLEX Expression Language (MVEL) is a hybrid dynamic/statically typed, embeddable Expression Language and runtime for the Java Platform. Originally started as a utility language for an application framework, the project is now developed completely independently. MVEL is typically used for exposing basic logic to end-users and programmers through configuration such as XML files or annotations. It may also be used to parse simple JavaBean expressions. The runtime allows MVEL expressions to be executed either interpretively, or through a pre-compilation process with support for runtime bytecode generation to remove overhead. Since MVEL is meant to augment Java-based software, it borrows most of its syntax directly from the Java programming language with some minor differences and additional capabilities. For example: as a side effect of MVEL's typing model, which treats class and method references as regular variables, it is possible to use both class and function pointers (but only for static methods). MVEL also allows collections to be represented as folds (or projections) in a Lisp-like syntax.
created 2008
backlinksCount 13
pageId 19100445
revisionCount 75
dailyPageViews 43