ASPL لباتASPL 0.7.0

Search documentation

Search starts with current English documentation · ASPL 0.7.0

Enter a complete name such as read_line, or words about a topic.

    العربية
    Source files

    Open one UTF-8 .aspl or .لبات file, up to 1 MiB, in a new draft. It stays in this browser and does not run automatically.

    Typed callable values

    ASPL 0.7.0 · Current release

    Pass a callable through a list, result and record, then print 42 and return 0.

    On this page

    Purpose and preparation

    Browser and native, ASPL 0.7.0. Uses typed functions, lists, records and results. No input lines, data assets or source modules are required. It passes a callable through each container, compares its identity, prints 42 followed by LF and returns 0.

    Current reference.

    Arabic source

    Open a new browser draft, then select Run explicitly. Opening checks without executing.

    Browser and native · ASPL 0.7.0 · Arabic source

    Execution: Browser and native · ASPL 0.7.0

    Prerequisites:
    • Uses functions, lists, records and results. No data files are required.

    Input: No input lines are required.

    دالة زيادة(قيمة: ص64) -> ص64 { أرجع قيمة + 4. }
    دالة اختر() -> دالة(ص64) -> ص64 { أرجع زيادة. }
    سجل حامل { استدعاء: دالة(ص64) -> ص64 }
    دالة طبق(عمل: دالة(ص64) -> ص64, قيمة: ص64) -> ص64 { أرجع عمل(قيمة). }
    دالة ابدأ_الرئيسية() -> ص64 {
        دع محفوظ: قائمة<دالة(ص64) -> ص64> = [اختر()].
        دع مغلف: نتيجة<دالة(ص64) -> ص64> = نجاح(محفوظ[0]).
        دع عنصر = حامل { استدعاء: مغلف::قيمة }.
        إذا عنصر::استدعاء لا يطابق زيادة { أرجع 1. }
        اطبع(نسق_ص64(طبق(عنصر::استدعاء, 38)) + "\س").
        أرجع 0.
    }
    
    Download قيم-الدوال.لبات

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "42\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "42\n"
      }
    }

    English source

    Open a new browser draft, then select Run explicitly. Opening checks without executing.

    Browser and native · ASPL 0.7.0 · English source

    Execution: Browser and native · ASPL 0.7.0

    Prerequisites:
    • Uses functions, lists, records and results. No data files are required.

    Input: No input lines are required.

    fn increment(value: i64) -> i64 { return value + 4; }
    fn choose() -> fn(i64) -> i64 { return increment; }
    record Carrier { callback: fn(i64) -> i64 }
    fn apply(action: fn(i64) -> i64, value: i64) -> i64 { return action(value); }
    fn start_main() -> i64 {
        let saved: list<fn(i64) -> i64> = [choose()];
        let wrapped: result<fn(i64) -> i64> = success(saved[0]);
        let carrier = Carrier { callback: wrapped::value };
        if carrier::callback not matches increment { return 1; }
        print(format_i64(apply(carrier::callback, 38)) + "\n");
        return 0;
    }
    
    Download callable-values.aspl

    Expected outcomes
    {
      "browser": {
        "check": "success",
        "class": "success",
        "output": "42\n",
        "processStatus": 0
      },
      "native": {
        "check": 0,
        "status": 0,
        "output": "42\n"
      }
    }

    Check the result

    Source cards show exact catalog outcomes. Downloads retain original bytes, digests and supplied vocabulary.

    Historical normative scope

    • Historical specification, English source

      Historical MVP function background only; callable values and source modules are later extensions audited against the published native/browser 0.7.0 implementation

    Browse pages