{
    "path": "/home/krm/dev/mimer-academia/programing/ts/class/Questions/generics.sv.json",
    "s": "Ignor",
    "invert": true,
    "level": 1,
    "title": [
        "Om generiska typ"
    ],
    "author": [
        "krm"
    ],
    "created": {
        "year": 2023,
        "month": 2,
        "day": 10
    },
    "status": "alpha",
    "category": [
        "oo"
    ],
    "index": 3,
    "description": [],
    "statments": [],
    "comment": [],
    "cards": [
        {
            "level": 1,
            "index": 1,
            "title": [
                "Vad är generisk typ(\"genric types\")?"
            ],
            "description": [],
            "statments": [
                {
                    "right": true,
                    "description": [
                        "Att en klass eller funktion har typparametrar."
                    ]
                },
                {
                    "description": [
                        "Att typerna används för genetisk programmering."
                    ]
                },
                {
                    "description": [
                        "Att typerna används i mycket allmäna förhållanden."
                    ]
                },
                {
                    "description": [
                        "Att parametrar kan ha olika namn."
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "Utgå från koden nedan."
            ],
            "description": [
                "Detta är kod."
            ],
            "lang": "js",
            "code": "function foo<T>(x:T) {\nreturn [x,x,x,x]\n}\nfunction boo<V,W>(y:V,z:W) {\nreturn [y,z]\n}\nlet X = foo<number>(1);\nlet Y = boo<number,string>(1,\"a\");\nlet Z = foo<boolean>(true);",
            "statments": [],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 2,
            "title": [
                "Vilken typ kommer \"X\" att ha?"
            ],
            "description": [],
            "statments": [
                {
                    "right": true,
                    "description": [
                        "number",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "(number|string)",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "boolean",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "boolean"
                    ]
                },
                {
                    "description": [
                        "string"
                    ]
                },
                {
                    "description": [
                        "number"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 3,
            "title": [
                "Vilken typ kommer \"Y\" att  ha?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "number",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "right": true,
                    "description": [
                        "(number|string)",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "boolean",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "boolean"
                    ]
                },
                {
                    "description": [
                        "string"
                    ]
                },
                {
                    "description": [
                        "number"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 4,
            "title": [
                "Vilken typ kommer \"Z\" att ha?"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "number",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "(number|string)",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "right": true,
                    "description": [
                        "boolean",
                        [
                            ""
                        ]
                    ]
                },
                {
                    "description": [
                        "boolean"
                    ]
                },
                {
                    "description": [
                        "string"
                    ]
                },
                {
                    "description": []
                }
            ],
            "comment": [],
            "kind": "question"
        }
    ],
    "kind": "questions"
}