Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2731185
input.xreate
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 14, 3:50 AM
Size
871 B
Mime Type
text/plain
Expires
Mon, Mar 16, 3:50 AM (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
243872
Attached To
rXR Xreate
input.xreate
View Options
//unsafe code propagation rule
rule: (X: function, Y: function)
case X call Y
{
warning Y tag unsafe -> X tag unsafe
message "safe function should not call unsafe code"
}
testfunc3 = function: (a: num, b: num)->num , unsafe //function tags list
{
x = a+b: num;
y = a - b: num;
(x + y) / 2;
}
testfunc2 = function: (a: num)->bool, unsafe // because of testfunc3 marked as unsafe code,
// testfunc2 should be marked so too
{
b = testfunc3(a+1, a-1): num;
(b==0);
}
/*cl
find6 = function: bool
{
x = [1, 2, 3, 4, 5, 6, 7]: [num]; //эффективная инициализация
y = map (x) [el]-> {2 * el};
exists(y, 12);
}
exists = function: (list:[a], el: a)->bool
{
acc: bool;
acc = reduce(list, false) [el, acc] ->
{
acc = acc & (el == e): saturated(true);
}
}
*/
Event Timeline
Log In to Comment