请用三种编程语言实现斐波那契数列生成函数，每种语言的函数定义和功能必须一样
user
```python
def fibonacci(n):
    if n <= 0:
        return []
    elif n == 1:
        return [0]
    elif n == 2:
        return [0, 1]
    else:
        fib_sequence = [0, 1]
        for i in range(2, n):
            fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
        return fib_sequence
```

```java
import java.util.ArrayList;
import java.util.List;

public class Fibonacci {
    public static List<Integer> fibonacci(int n) {
        if (n <= 0) {
            return new ArrayList<>();
        } else if (n == 1) {
            List<Integer> result = new ArrayList<>();
            result.add(0);
            return result;
        } else if (n == 2) {
            List<Integer> result = new ArrayList<>();
            result.add(0);
            result.add(1);
            return result;
        } else {
            List<Integer> fibSequence = new ArrayList<>();
            fibSequence.add(0);
            fibSequence.add(1);
            for (int i = 2; i < n; i++) {
                fibSequence.add(fibSequence.get(i - 1) + fibSequence.get(i - 2));
            }
            return fibSequence;
        }
    }
}
```

```csharp
using System;
using System.Collections.Generic;

public class Fibonacci {
    public static List<int> Fibonacci(int n) {
        if (n <= 0) {
            return new List<int>();
        } else if (n == 1) {
            return new List<int> { 0 };
        } else if (n == 2) {
            return new List<int> { 0, 1 };
        } else {
            var fibSequence = new List<int> { 0, 1 };
            for (int i = 2; i < n; i++) {
                fibSequence.Add(fibSequence[i - 1] + fibSequence[i - 2]);
            }
            return fibSequence;
        }
    }
}
```
assistant