def funstr2schema(funstr: str) -> dict:

    """
        A `funstr` is a functional-string, containing information
        of a schema in one string, written in a certain way.

        Explinations: 
            Let funstr = (a:x, b:y) -> f:x. (c:x) -> g. (f:x, g:y) -> h:y 
            (:x, :y) -> f mening that f is expected to have x, y as keyword
            input. (a:x, b:y) mening variable a maps to x, and variable b to y.
            (:, :) -> f meaning that f is expected to have two positional arg inputs.
            f:x meaning that result from ... -> f will be stored in variable x.
            Dot (.) meaning end of statement.
    """

    try:
        schema = {}
        statements = funstr.replace(" ", "").split(".")
        for statement in statements:
            arguments_string, function_string = statement.split("->")
            poskey_arguments = arguments_string.replace("(", "").replace(")", "").split(",")
            arguments = [tuple(arg.split(':')) for arg in poskey_arguments]
            fn_name, outvar = function_string.split(":")

            schema[outvar] = (fn_name, arguments)
        
        return schema
    except Exception as e:
        raise Exception(f"could not create schema from function-string '{funstr}' because of error: {e}")